[llvm] 58b0485 - [NFC][PPC] Autogenerate checklines in ppc-ctr-dead-code.ll to simplify update

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 16:48:12 PST 2022


Author: Roman Lebedev
Date: 2022-12-06T03:47:46+03:00
New Revision: 58b0485118f71d5b0e0645e4512d99c2929feeb1

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

LOG: [NFC][PPC] Autogenerate checklines in ppc-ctr-dead-code.ll to simplify update

Added: 
    

Modified: 
    llvm/test/CodeGen/PowerPC/ppc-ctr-dead-code.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/ppc-ctr-dead-code.ll b/llvm/test/CodeGen/PowerPC/ppc-ctr-dead-code.ll
index 04944d5ee73e2..f3a568a6de44c 100644
--- a/llvm/test/CodeGen/PowerPC/ppc-ctr-dead-code.ll
+++ b/llvm/test/CodeGen/PowerPC/ppc-ctr-dead-code.ll
@@ -1,10 +1,56 @@
-; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -verify-machineinstrs | FileCheck %s
-; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 -verify-machineinstrs | FileCheck %s
-; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -verify-machineinstrs | FileCheck %s
-; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -verify-machineinstrs | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,V01,CHECK-V0
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,V01,CHECK-V1
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,V23,CHECK-V2
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,V23,CHECK-V3
 
 ; Function Attrs: norecurse nounwind readonly
 define signext i32 @limit_loop(i32 signext %iters, ptr nocapture readonly %vec, i32 signext %limit) local_unnamed_addr {
+; V01-LABEL: limit_loop:
+; V01:       # %bb.0: # %entry
+; V01-NEXT:    mr 6, 3
+; V01-NEXT:    li 3, 0
+; V01-NEXT:    cmpwi 6, 0
+; V01-NEXT:    blelr 0
+; V01-NEXT:  # %bb.1: # %for.body.preheader
+; V01-NEXT:    mtctr 6
+; V01-NEXT:    addi 4, 4, -4
+; V01-NEXT:    b .LBB0_3
+; V01-NEXT:    .p2align 4
+; V01-NEXT:  .LBB0_2: # %for.cond
+; V01-NEXT:    #
+; V01-NEXT:    bdzlr
+; V01-NEXT:  .LBB0_3: # %for.body
+; V01-NEXT:    #
+; V01-NEXT:    lwzu 6, 4(4)
+; V01-NEXT:    cmpw 6, 5
+; V01-NEXT:    blt 0, .LBB0_2
+; V01-NEXT:  # %bb.4:
+; V01-NEXT:    li 3, 1
+; V01-NEXT:    blr
+;
+; V23-LABEL: limit_loop:
+; V23:       # %bb.0: # %entry
+; V23-NEXT:    mr 6, 3
+; V23-NEXT:    li 3, 0
+; V23-NEXT:    cmpwi 6, 0
+; V23-NEXT:    blelr 0
+; V23-NEXT:  # %bb.1: # %for.body.preheader
+; V23-NEXT:    addi 4, 4, -4
+; V23-NEXT:    mtctr 6
+; V23-NEXT:    b .LBB0_3
+; V23-NEXT:    .p2align 4
+; V23-NEXT:  .LBB0_2: # %for.cond
+; V23-NEXT:    #
+; V23-NEXT:    bdzlr
+; V23-NEXT:  .LBB0_3: # %for.body
+; V23-NEXT:    #
+; V23-NEXT:    lwzu 6, 4(4)
+; V23-NEXT:    cmpw 6, 5
+; V23-NEXT:    blt 0, .LBB0_2
+; V23-NEXT:  # %bb.4:
+; V23-NEXT:    li 3, 1
+; V23-NEXT:    blr
 entry:
   %cmp5 = icmp sgt i32 %iters, 0
   br i1 %cmp5, label %for.body.preheader, label %cleanup
@@ -28,11 +74,12 @@ for.body:                                         ; preds = %for.body.preheader,
 cleanup:                                          ; preds = %for.body, %for.cond, %entry
   %2 = phi i32 [ 0, %entry ], [ 0, %for.cond ], [ 1, %for.body ]
   ret i32 %2
-; CHECK-LABEL: limit_loop
-; CHECK: mtctr
-; CHECK-NOT: addi {{[0-9]+}}, {{[0-9]+}}, 1
-; CHECK: bdzlr
-; CHECK: blr
 }
 
 
+;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
+; CHECK: {{.*}}
+; CHECK-V0: {{.*}}
+; CHECK-V1: {{.*}}
+; CHECK-V2: {{.*}}
+; CHECK-V3: {{.*}}


        


More information about the llvm-commits mailing list