[PATCH] D12516: Const propagation after hitting assume bugfix 2

Nick Lewycky via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 10:15:44 PDT 2015


nlewycky added a comment.

Typo in summary, "There was ifinite loop" should say "infinite".


================
Comment at: include/llvm/IR/Instructions.h:329
@@ -328,2 +328,3 @@
   }
+
   StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore);
----------------
This change isn't logically part of the const propagation bugfix. Either commit it separately or discard it.

================
Comment at: lib/Transforms/Scalar/GVN.cpp:1778-1780
@@ +1777,5 @@
+      Type *Int8Ty = Type::getInt8Ty(V->getContext());
+      // Insert a new store to null instruction before the load to indicate that
+      // this code is not reachable.  We do this instead of inserting an
+      // unreachable instruction directly because we cannot modify the CFG.
+      new StoreInst(UndefValue::get(Int8Ty),
----------------
GVN can directly modify the CFG (unlike InstCombine which calls setPreservesCFG). Rephrase the comment about unreachable instruction into a TODO.


http://reviews.llvm.org/D12516





More information about the llvm-commits mailing list