[PATCH] D13390: SCEV: handle constant condition for select/branch

Manman Ren via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 13:42:39 PDT 2015


manmanren added a subscriber: manmanren.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:3894
@@ +3893,3 @@
+  if (!ICI) {
+    // If this is not an integer condition, it might still be a constant
+    if (auto *CI = dyn_cast<ConstantInt>(Cond)) {
----------------
Please add a period at end of the comment.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:3899
@@ +3898,3 @@
+      else
+        return getSCEV(FalseVal);
+    }
----------------

Should this be simplified to
return getSCEV(CI->isOne() ? TrueValue : FalseVal);


http://reviews.llvm.org/D13390





More information about the llvm-commits mailing list