Fixed memory_share for unconditional write with part select to memory
authorClifford Wolf <clifford@clifford.at>
Wed, 22 Apr 2015 04:40:23 +0000 (06:40 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 22 Apr 2015 04:40:23 +0000 (06:40 +0200)
passes/memory/memory_share.cc

index 3d241433a638809fc29782456181564b2c5abc34..1845d56ea8346e295c9981a925a0802f37e0f9ac 100644 (file)
@@ -125,6 +125,9 @@ struct MemoryShareWorker
                        created_conditions++;
                }
 
+               if (terms.size() == 0)
+                       terms = State::S1;
+
                if (terms.size() > 1)
                        terms = module->ReduceAnd(NEW_ID, terms);