[llvm] [ConstantRange] Improve `shlWithNoWrap` (PR #101800)

Rose Silicon via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 11:51:14 PDT 2024


================
@@ -86,7 +86,7 @@ define i8 @test4(i8 %a, i8 %b) {
 ; CHECK-NEXT:    br i1 [[CMP]], label [[BB:%.*]], label [[EXIT:%.*]]
 ; CHECK:       bb:
 ; CHECK-NEXT:    [[SHL:%.*]] = shl nuw nsw i8 [[A:%.*]], [[B]]
-; CHECK-NEXT:    ret i8 -1
+; CHECK-NEXT:    ret i8 [[SHL]]
----------------
RSilicon wrote:

Is this a miscompile or?

https://github.com/llvm/llvm-project/pull/101800


More information about the llvm-commits mailing list