[llvm] [SCEV] Check AR's wrap flags when expanding. (PR #77827)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 08:04:45 PST 2024
================
@@ -22,7 +22,7 @@ define i32 @test() {
; CHECK-NEXT: [[IV_2:%.*]] = phi i32 [ [[LSR_IV_NEXT2_LCSSA]], [[LOOP_2_PH]] ], [ [[IV_2_NEXT:%.*]], [[LOOP_2]] ]
; CHECK-NEXT: call void @use(i32 [[IV_2]])
; CHECK-NEXT: [[IV_2_NEXT]] = add i32 [[IV_2]], 1
-; CHECK-NEXT: [[LSR_IV_NEXT]] = add nsw i64 [[LSR_IV]], -1
+; CHECK-NEXT: [[LSR_IV_NEXT]] = add nuw nsw i64 [[LSR_IV]], -1
----------------
fhahn wrote:
I think this is due to range info, LSR will likely cause wrap flags to be strengthened by adding info from BTC
https://github.com/llvm/llvm-project/pull/77827
More information about the llvm-commits
mailing list