[PATCH] D34165: [ValueTracking] Correct early out in computeKnownBitsFromOperator to work with non power of 2 bit widths

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 09:33:06 PDT 2017


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: test/Transforms/InstCombine/shift.ll:1309-1317
+define i7 @test65(i7 %a, i7 %b) {
+; CHECK-LABEL: @test65(
+; CHECK-NEXT:    ret i7 0
+;
+  %shiftamt = and i7 %b, 6
+  %x = lshr i7 42, %shiftamt
+  %y = and i7 %x, 1
----------------
A comment or hex values to help explain why this is true would be good.


https://reviews.llvm.org/D34165





More information about the llvm-commits mailing list