[llvm] [IndVarSimplify] Set samesign when converting signed comparison to unsigned comparison in eliminateIVComparison. (PR #138215)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 16:26:09 PDT 2025
================
@@ -57,14 +57,14 @@ define void @test_2(i32 %n, ptr %len_buf) {
; CHECK-SAME: (i32 [[N:%.*]], ptr [[LEN_BUF:%.*]]) {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[LEN:%.*]] = load i32, ptr [[LEN_BUF]], align 4, !range [[RNG1:![0-9]+]]
-; CHECK-NEXT: [[TMP0:%.*]] = zext i32 [[LEN]] to i64
+; CHECK-NEXT: [[TMP0:%.*]] = sext i32 [[LEN]] to i64
----------------
topperc wrote:
This looks to be an interaction with the isSameSign check in WidenIV::widenLoopCompare
https://github.com/llvm/llvm-project/pull/138215
More information about the llvm-commits
mailing list