[PATCH] D13717: [IndVars] Have `cloneArithmeticIVUser` guess better

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 13:07:22 PDT 2015


sanjoy added inline comments.

================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:1020
@@ +1019,3 @@
+
+    case Instruction::Add:
+      WideOp = SE->getAddExpr(WideLHS, WideRHS);
----------------
reames wrote:
> Isn't there something along the lines of SE->getBinOp?
Coud not find any such thing.

================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:1037
@@ +1036,3 @@
+
+    return WideOp == WideAR;
+  };
----------------
reames wrote:
> Comment?  Where'd WideAR come from?
Added a comment explaining what's going on.


http://reviews.llvm.org/D13717





More information about the llvm-commits mailing list