[PATCH] D9149: [SeparateConstOffsetFromGEP] Bail there is only one GEP offset

Gerolf Hoflehner via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 10:47:52 PDT 2016


Gerolf added inline comments.

================
Comment at: lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:832
@@ -831,3 +831,3 @@
   // constant.
-  if (GEP->hasAllConstantIndices())
+  if (GEP->hasAllConstantIndices() || GEP->getNumOperands() == 2)
     return false;
----------------
Please comment on the rationale for ==2. Is there a more general cost model problem?


Repository:
  rL LLVM

http://reviews.llvm.org/D9149





More information about the llvm-commits mailing list