[llvm] 97be79c - [Reassociate] Generate test checks (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 23:19:45 PDT 2024


Author: Nikita Popov
Date: 2024-05-09T15:19:29+09:00
New Revision: 97be79ca126c1a0e174fdbc345a28868edc7cdc7

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

LOG: [Reassociate] Generate test checks (NFC)

Added: 
    

Modified: 
    llvm/test/Transforms/Reassociate/fast-ArrayOutOfBounds.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Reassociate/fast-ArrayOutOfBounds.ll b/llvm/test/Transforms/Reassociate/fast-ArrayOutOfBounds.ll
index faabd8d7815b4..6dc7b89a9b186 100644
--- a/llvm/test/Transforms/Reassociate/fast-ArrayOutOfBounds.ll
+++ b/llvm/test/Transforms/Reassociate/fast-ArrayOutOfBounds.ll
@@ -1,25 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
 ; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
 
 ; Not marked as fast, so must not change.
 define float @test1(float %a0, float %a1, float %a2, float %a3, float %a4) {
-; CHECK-LABEL: test1
-; CHECK-NEXT: %tmp.2 = fadd float %a3, %a4
-; CHECK-NEXT: %tmp.4 = fadd float %tmp.2, %a2
-; CHECK-NEXT: %tmp.6 = fadd float %tmp.4, %a1
-; CHECK-NEXT: %tmp.8 = fadd float %tmp.6, %a0
-; CHECK-NEXT: %tmp.11 = fadd float %a2, %a3
-; CHECK-NEXT: %tmp.13 = fadd float %tmp.11, %a1
-; CHECK-NEXT: %tmp.15 = fadd float %tmp.13, %a0
-; CHECK-NEXT: %tmp.18 = fadd float %a1, %a2
-; CHECK-NEXT: %tmp.20 = fadd float %tmp.18, %a0
-; CHECK-NEXT: %tmp.23 = fadd float %a0, %a1
-; CHECK-NEXT: %tmp.26 = fsub float %tmp.8, %tmp.15
-; CHECK-NEXT: %tmp.28 = fadd float %tmp.20, %tmp.26
-; CHECK-NEXT: %tmp.30 = fsub float %tmp.28, %tmp.23
-; CHECK-NEXT: %tmp.32 = fsub float %tmp.30, %a4
-; CHECK-NEXT: %tmp.34 = fsub float %tmp.32, %a2
-; CHECK-NEXT: %T = fmul float %tmp.34, %tmp.34
-; CHECK-NEXT: ret float %T
+; CHECK-LABEL: define float @test1(
+; CHECK-SAME: float [[A0:%.*]], float [[A1:%.*]], float [[A2:%.*]], float [[A3:%.*]], float [[A4:%.*]]) {
+; CHECK-NEXT:    [[TMP_2:%.*]] = fadd float [[A3]], [[A4]]
+; CHECK-NEXT:    [[TMP_4:%.*]] = fadd float [[TMP_2]], [[A2]]
+; CHECK-NEXT:    [[TMP_6:%.*]] = fadd float [[TMP_4]], [[A1]]
+; CHECK-NEXT:    [[TMP_8:%.*]] = fadd float [[TMP_6]], [[A0]]
+; CHECK-NEXT:    [[TMP_11:%.*]] = fadd float [[A2]], [[A3]]
+; CHECK-NEXT:    [[TMP_13:%.*]] = fadd float [[TMP_11]], [[A1]]
+; CHECK-NEXT:    [[TMP_15:%.*]] = fadd float [[TMP_13]], [[A0]]
+; CHECK-NEXT:    [[TMP_18:%.*]] = fadd float [[A1]], [[A2]]
+; CHECK-NEXT:    [[TMP_20:%.*]] = fadd float [[TMP_18]], [[A0]]
+; CHECK-NEXT:    [[TMP_23:%.*]] = fadd float [[A0]], [[A1]]
+; CHECK-NEXT:    [[TMP_26:%.*]] = fsub float [[TMP_8]], [[TMP_15]]
+; CHECK-NEXT:    [[TMP_28:%.*]] = fadd float [[TMP_20]], [[TMP_26]]
+; CHECK-NEXT:    [[TMP_30:%.*]] = fsub float [[TMP_28]], [[TMP_23]]
+; CHECK-NEXT:    [[TMP_32:%.*]] = fsub float [[TMP_30]], [[A4]]
+; CHECK-NEXT:    [[TMP_34:%.*]] = fsub float [[TMP_32]], [[A2]]
+; CHECK-NEXT:    [[T:%.*]] = fmul float [[TMP_34]], [[TMP_34]]
+; CHECK-NEXT:    ret float [[T]]
+;
 
   %tmp.2 = fadd float %a4, %a3
   %tmp.4 = fadd float %tmp.2, %a2
@@ -42,8 +45,10 @@ define float @test1(float %a0, float %a1, float %a2, float %a3, float %a4) {
 
 ; Should be able to eliminate everything.
 define float @test2(float %a0, float %a1, float %a2, float %a3, float %a4) {
-; CHECK-LABEL: test2
-; CHECK: ret float 0.000000e+00
+; CHECK-LABEL: define float @test2(
+; CHECK-SAME: float [[A0:%.*]], float [[A1:%.*]], float [[A2:%.*]], float [[A3:%.*]], float [[A4:%.*]]) {
+; CHECK-NEXT:    ret float 0.000000e+00
+;
 
   %tmp.2 = fadd fast float %a4, %a3
   %tmp.4 = fadd fast float %tmp.2, %a2


        


More information about the llvm-commits mailing list