[PATCH] D11051: Extend LICM to hoist loop invariant GEP out

Andrew Trick atrick at apple.com
Tue Jul 28 10:26:43 PDT 2015


atrick added inline comments.

================
Comment at: lib/Transforms/Scalar/LICM.cpp:1147
@@ +1146,3 @@
+    FirstGEP->setIsInBounds(true);
+  else
+    FirstGEP->setIsInBounds(false);
----------------
I don't follow this comment. My reading of langref is that both the GEP's base and result must be inbounds. So if the first GEP is not inbounds and is the base of the second GEP, then the second GEP cannot be inbounds. (This is why I generally don't like this transformation.)


Repository:
  rL LLVM

http://reviews.llvm.org/D11051







More information about the llvm-commits mailing list