[llvm] 2f56977 - [IndVarSimplify] Add regression test for recently-added refactor (NFC)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 28 03:07:46 PST 2025


Author: Antonio Frighetto
Date: 2025-11-28T11:59:46+01:00
New Revision: 2f56977aea4b76a4d533ba7e4827e13878c4f936

URL: https://github.com/llvm/llvm-project/commit/2f56977aea4b76a4d533ba7e4827e13878c4f936
DIFF: https://github.com/llvm/llvm-project/commit/2f56977aea4b76a4d533ba7e4827e13878c4f936.diff

LOG: [IndVarSimplify] Add regression test for recently-added refactor (NFC)

Add a test case for commit f54c6b4306a3f92c08aeb8a9fa222b88985cb9ef, which was previously failing after
refactor in b27af83120b32a4b8312ddf1e6317271122769e4.

Added: 
    

Modified: 
    llvm/test/Transforms/IndVarSimplify/floating-point-iv.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/IndVarSimplify/floating-point-iv.ll b/llvm/test/Transforms/IndVarSimplify/floating-point-iv.ll
index c4933678d0391..a01c032460632 100644
--- a/llvm/test/Transforms/IndVarSimplify/floating-point-iv.ll
+++ b/llvm/test/Transforms/IndVarSimplify/floating-point-iv.ll
@@ -553,4 +553,27 @@ exit:
   ret void
 }
 
+define void @test_fp_recurrence_cmp_used_by_select() {
+; CHECK-LABEL: @test_fp_recurrence_cmp_used_by_select(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    br label [[LOOP:%.*]]
+; CHECK:       loop:
+; CHECK-NEXT:    br i1 false, label [[LOOP]], label [[EXIT:%.*]]
+; CHECK:       exit:
+; CHECK-NEXT:    ret void
+;
+entry:
+  br label %loop
+
+loop:
+  %fp.iv = phi double [ 0.0, %entry ], [ %fp.iv.next, %loop ]
+  %fp.iv.next = fadd double %fp.iv, 1.250000e-02
+  %cmp.fp = fcmp olt double %fp.iv.next, 2.001250e+00
+  %cond = select i1 %cmp.fp, i1 false, i1 false
+  br i1 %cond, label %loop, label %exit
+
+exit:
+  ret void
+}
+
 declare void @opaque()


        


More information about the llvm-commits mailing list