[PATCH] D31488: [SimplifyIndvar] Replace the sdiv used by IV if we can prove both of its operands are non-negative

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 00:56:04 PDT 2017


etherzhhb marked an inline comment as done.
etherzhhb added inline comments.


================
Comment at: test/Transforms/IndVarSimplify/replace-sdiv-by-udiv.ll:10
+  %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
+  %div = sdiv i32 %i.01, 2
+; CHECK-NOT: sdiv
----------------
instcombine (which use computeKnownBits) is not able to prove the status of the signbit of %i.01 here


https://reviews.llvm.org/D31488





More information about the llvm-commits mailing list