[PATCH] D41233: [InstCombine] Canonizing 'and' before 'shl'

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 10:00:34 PST 2017


craig.topper added inline comments.


================
Comment at: test/Transforms/InstCombine/2010-11-01-lshr-mask.ll:7
 ; CHECK-NEXT:    [[TMP3151:%.*]] = trunc i32 %argc to i8
-; CHECK-NEXT:    [[TMP1:%.*]] = shl i8 [[TMP3151]], 5
-; CHECK-NEXT:    [[TMP4126:%.*]] = and i8 [[TMP1]], 64
+; CHECK-NEXT:    [[TMP1:%.*]] = lshr i8 [[TMP3151]], 1
+; CHECK-NEXT:    [[TMP4120:%.*]] = and i8 [[TMP1]], 1
----------------
This looks like a regression.


================
Comment at: test/Transforms/InstCombine/cast.ll:814
 ; CHECK-LABEL: @test59(
-; CHECK-NEXT:    [[C:%.*]] = zext i8 %A to i64
-; CHECK-NEXT:    [[D:%.*]] = shl nuw nsw i64 [[C]], 4
----------------
Any idea why were weren't simplifying this before this change?


Repository:
  rL LLVM

https://reviews.llvm.org/D41233





More information about the llvm-commits mailing list