[llvm] 6aeec5e - [ConstraintElim] Test for #128588

Andreas Jonson via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 03:35:11 PST 2025


Author: Andreas Jonson
Date: 2025-02-25T12:35:05+01:00
New Revision: 6aeec5eabfe11f017dd4e427ff5e9a4695f2a24a

URL: https://github.com/llvm/llvm-project/commit/6aeec5eabfe11f017dd4e427ff5e9a4695f2a24a
DIFF: https://github.com/llvm/llvm-project/commit/6aeec5eabfe11f017dd4e427ff5e9a4695f2a24a.diff

LOG: [ConstraintElim] Test for #128588

Added: 
    

Modified: 
    llvm/test/Transforms/ConstraintElimination/analysis-invalidation.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/ConstraintElimination/analysis-invalidation.ll b/llvm/test/Transforms/ConstraintElimination/analysis-invalidation.ll
index 932be125fceae..e59bd13603fff 100644
--- a/llvm/test/Transforms/ConstraintElimination/analysis-invalidation.ll
+++ b/llvm/test/Transforms/ConstraintElimination/analysis-invalidation.ll
@@ -1,4 +1,3 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
 ; RUN: opt -passes='require<demanded-bits>,constraint-elimination,require<demanded-bits>' -disable-verify -verify-analysis-invalidation=false -debug-pass-manager -disable-output %s 2>&1 | FileCheck %s
 
 ; Check that constraint-elimination properly invalidates anlyses.
@@ -34,6 +33,21 @@
 ; CHECK-NEXT: Running pass: RequireAnalysisPass
 ; CHECK-NEXT: Running analysis: DemandedBitsAnalysis on uge_zext
 
+; CHECK-NEXT: Running pass: RequireAnalysisPass
+; CHECK-NEXT: Running analysis: DemandedBitsAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: AssumptionAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: TargetIRAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: DominatorTreeAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running pass: ConstraintEliminationPass on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: LoopAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: ScalarEvolutionAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: TargetLibraryAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running analysis: OptimizationRemarkEmitterAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Invalidating analysis: DemandedBitsAnalysis on test_mul_const_nuw_unsigned_14
+; CHECK-NEXT: Running pass: RequireAnalysisPass
+; CHECK-NEXT: Running analysis: DemandedBitsAnalysis on test_mul_const_nuw_unsigned_14
+
+
 declare { i8, i1 } @llvm.ssub.with.overflow.i8(i8, i8)
 
 define i8 @ssub_no_overflow_due_to_or_conds(i8 %a, i8 %b) {
@@ -72,5 +86,13 @@ bb1:
 bb2:
   ret i1 false
 }
-;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
-; CHECK: {{.*}}
+
+define i1 @test_mul_const_nuw_unsigned_14(i8 %start) {
+  %start.mul.5 = mul nuw i8 %start, -5
+  %c.0 = icmp ult i8 %start, %start.mul.5
+  call void @llvm.assume(i1 %c.0)
+
+  %start.mul.3 = mul nuw i8 %start, -3
+  %t.1 = icmp ule i8 %start.mul.3, %start.mul.5
+  ret i1 %t.1
+}


        


More information about the llvm-commits mailing list