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

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 3 08:03:03 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]]
----------------
dtcxzyw wrote:

Do you guys have a plan to treat empty ranges as poison?


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


More information about the llvm-commits mailing list