Skip to content

Commit b6b9063

Browse files
committed
Add register pressure debug output checks
1 parent 54af7d2 commit b6b9063

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-neon.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
; RUN: opt -passes=loop-vectorize -enable-epilogue-vectorization=false -mattr=+neon,+dotprod -force-vector-interleave=1 -S < %s | FileCheck %s --check-prefixes=CHECK-INTERLEAVE1
33
; RUN: opt -passes=loop-vectorize -enable-epilogue-vectorization=false -mattr=+neon,+dotprod -S < %s | FileCheck %s --check-prefixes=CHECK-INTERLEAVED
44
; RUN: opt -passes=loop-vectorize -enable-epilogue-vectorization=false -mattr=+neon,+dotprod -force-vector-interleave=1 -vectorizer-maximize-bandwidth -S < %s | FileCheck %s --check-prefixes=CHECK-MAXBW
5+
; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize --disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-REGS
56

67
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
78
target triple = "aarch64-none-unknown-elf"
@@ -947,6 +948,12 @@ define i32 @dotp_unrolled(i32 %num_out, i64 %num_in, ptr %a, ptr %b) {
947948
; CHECK-MAXBW-NEXT: br i1 [[CMP_N]], label [[EXIT:%.*]], label [[SCALAR_PH]]
948949
; CHECK-MAXBW: scalar.ph:
949950
;
951+
; CHECK-REGS: LV: Checking a loop in 'dotp_unrolled' from <stdin>
952+
; CHECK-REGS: LV(REG): VF = 16
953+
; CHECK-REGS-NEXT: LV(REG): Found max usage: 2 item
954+
; CHECK-REGS-NEXT: LV(REG): RegisterClass: Generic::ScalarRC, 9 registers
955+
; CHECK-REGS-NEXT: LV(REG): RegisterClass: Generic::VectorRC, 24 registers
956+
; CHECK-REGS-NEXT: LV(REG): Found invariant usage: 1 item
950957
entry:
951958
br label %for.body
952959

llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
; RUN: opt -passes=loop-vectorize -force-vector-interleave=1 -enable-epilogue-vectorization=false -S < %s | FileCheck %s --check-prefixes=CHECK-INTERLEAVE1
33
; RUN: opt -passes=loop-vectorize -enable-epilogue-vectorization=false -S < %s | FileCheck %s --check-prefixes=CHECK-INTERLEAVED
44
; RUN: opt -passes=loop-vectorize -force-vector-interleave=1 -vectorizer-maximize-bandwidth -enable-epilogue-vectorization=false -S < %s | FileCheck %s --check-prefixes=CHECK-MAXBW
5+
; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize --disable-output -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK-REGS
56

67
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
78
target triple = "aarch64-none-unknown-elf"
@@ -3420,6 +3421,12 @@ define dso_local void @not_dotp_high_register_pressure(ptr %a, ptr %b, ptr %sum,
34203421
; CHECK-MAXBW-NEXT: br i1 [[CMP_N]], label [[FOR_COND_FOR_COND_CLEANUP_CRIT_EDGE:%.*]], label [[SCALAR_PH]]
34213422
; CHECK-MAXBW: scalar.ph:
34223423
;
3424+
; CHECK-REGS-LABEL: LV: Checking a loop in 'dotp_high_register_pressure' from <stdin>
3425+
; CHECK-REGS: LV(REG): VF = 16
3426+
; CHECK-REGS-NEXT: LV(REG): Found max usage: 2 item
3427+
; CHECK-REGS-NEXT: LV(REG): RegisterClass: Generic::ScalarRC, 3 registers
3428+
; CHECK-REGS-NEXT: LV(REG): RegisterClass: Generic::VectorRC, 24 registers
3429+
; CHECK-REGS-NEXT: LV(REG): Found invariant usage: 1 item
34233430
entry:
34243431
%cmp100 = icmp sgt i32 %n, 0
34253432
br i1 %cmp100, label %for.body.lr.ph, label %for.cond.cleanup

0 commit comments

Comments
 (0)