[PATCH] D13358: InstCombine: Fold comparisons between unguessable allocas and other pointers
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 17:41:47 PDT 2015
majnemer added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:780
@@ +779,3 @@
+ // Storing *to* the pointer is fine, but storing the pointer escapes it.
+ if (SI->getValueOperand() == U->get())
+ return nullptr;
----------------
Is this sufficient? What if `getValueOperand` is not `U->get()` but, say, a bitcast of `U->get()` ?
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:792-793
@@ +791,4 @@
+ case Intrinsic::dbg_declare: case Intrinsic::dbg_value:
+ case Intrinsic::memcpy: case Intrinsic::memmove: case Intrinsic::memset:
+ continue;
+ default:
----------------
Can't `memcpy` escape the value just like a `StoreInst` would?
http://reviews.llvm.org/D13358
More information about the llvm-commits
mailing list