[llvm-branch-commits] [llvm] acc6a14 - [Tests][ConstraintElim] autogen newly-added case in large-constant-ints.ll (NFC)

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 30 08:08:19 PDT 2023


Author: Erik Desjardins
Date: 2023-08-30T16:57:47+02:00
New Revision: acc6a14413f3edb6661c6d77c2edbd9fa804e458

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

LOG: [Tests][ConstraintElim] autogen newly-added case in large-constant-ints.ll (NFC)

I forgot to do this in 66ec5df3a7f33366455d50769e4e878544becea6 / https://reviews.llvm.org/D158810.

Since this is testing for an assertion failure, the test checks don't matter, but we might as well avoid unnecessary churn the next time someone modifies this test.

(cherry picked from commit df112cba034eefb86d0e92e18518f5e944d58c37)

Added: 
    

Modified: 
    llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll b/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
index ae49ff9063fbed..f08068420406d1 100644
--- a/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
+++ b/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
@@ -283,16 +283,26 @@ else:
 }
 
 define i1 @mul_nsw_decomp(i128 %x) {
-    %val = mul nsw i128 %x, 9223372036854775808
-    %cmp = icmp sgt i128 %x, %val
-    br i1 %cmp, label %then, label %else
+; CHECK-LABEL: @mul_nsw_decomp(
+; CHECK-NEXT:    [[VAL:%.*]] = mul nsw i128 [[X:%.*]], 9223372036854775808
+; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i128 [[X]], [[VAL]]
+; CHECK-NEXT:    br i1 [[CMP]], label [[THEN:%.*]], label [[ELSE:%.*]]
+; CHECK:       then:
+; CHECK-NEXT:    [[CMP2:%.*]] = icmp sgt i128 [[X]], 0
+; CHECK-NEXT:    ret i1 [[CMP2]]
+; CHECK:       else:
+; CHECK-NEXT:    ret i1 false
+;
+  %val = mul nsw i128 %x, 9223372036854775808
+  %cmp = icmp sgt i128 %x, %val
+  br i1 %cmp, label %then, label %else
 
 then:
-    %cmp2 = icmp sgt i128 %x, 0
-    ret i1 %cmp2
+  %cmp2 = icmp sgt i128 %x, 0
+  ret i1 %cmp2
 
 else:
-    ret i1 false
+  ret i1 false
 }
 
 define i1 @add_nuw_decomp_recursive() {


        


More information about the llvm-branch-commits mailing list