2017-03-02 06:56:20 +08:00
|
|
|
# RUN: llc -run-pass arm-prera-ldst-opt %s -o - | FileCheck %s
|
2019-02-11 17:37:42 +08:00
|
|
|
# RUN: llc -run-pass arm-prera-ldst-opt -arm-prera-ldst-opt-reorder-limit=3 %s -o - | FileCheck %s
|
|
|
|
# RUN: llc -run-pass arm-prera-ldst-opt -arm-prera-ldst-opt-reorder-limit=2 %s -o - | FileCheck %s --check-prefix=CHECK-LIMIT
|
2017-03-02 06:56:20 +08:00
|
|
|
--- |
|
|
|
|
target triple = "thumbv7---eabi"
|
|
|
|
|
|
|
|
define void @a(i32* nocapture %x, i32 %y, i32 %z) {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @b(i32* nocapture %x, i32 %y, i32 %z) {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
...
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: a
|
|
|
|
name: a
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 2
|
2017-03-02 06:56:20 +08:00
|
|
|
tracksRegLiveness: true
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$r0', virtual-reg: '%0' }
|
|
|
|
- { reg: '$r1', virtual-reg: '%1' }
|
|
|
|
- { reg: '$r2', virtual-reg: '%2' }
|
2017-03-02 06:56:20 +08:00
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $r0, $r1, $r2
|
2017-03-02 06:56:20 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%2 : rgpr = COPY $r2
|
|
|
|
%1 : rgpr = COPY $r1
|
|
|
|
%0 : gpr = COPY $r0
|
|
|
|
%3 : rgpr = t2MUL %2, %2, 14, $noreg
|
|
|
|
%4 : rgpr = t2MUL %1, %1, 14, $noreg
|
2017-03-02 06:56:20 +08:00
|
|
|
%5 : rgpr = t2MOVi32imm -858993459
|
2018-02-01 06:04:26 +08:00
|
|
|
%6 : rgpr, %7 : rgpr = t2UMULL killed %3, %5, 14, $noreg
|
|
|
|
%8 : rgpr, %9 : rgpr = t2UMULL killed %4, %5, 14, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 %1, %0, 0, 14, $noreg :: (store (s32))
|
2018-02-01 06:04:26 +08:00
|
|
|
%10 : rgpr = t2LSLri %2, 1, 14, $noreg, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 killed %10, %0, 4, 14, $noreg :: (store (s32))
|
2017-03-03 05:39:39 +08:00
|
|
|
|
|
|
|
; Make sure we move the paired stores next to each other, and
|
|
|
|
; insert them in an appropriate location.
|
|
|
|
; CHECK: t2STRi12 %1,
|
|
|
|
; CHECK-NEXT: t2STRi12 killed %10,
|
|
|
|
; CHECK-NEXT: t2MOVi
|
|
|
|
; CHECK-NEXT: t2ADDrs
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%11 : rgpr = t2MOVi 55, 14, $noreg, $noreg
|
|
|
|
%12 : gprnopc = t2ADDrs %11, killed %7, 19, 14, $noreg, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 killed %12, %0, 16, 14, $noreg :: (store (s32))
|
2018-02-01 06:04:26 +08:00
|
|
|
%13 : gprnopc = t2ADDrs %11, killed %9, 19, 14, $noreg, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 killed %13, %0, 20, 14, $noreg :: (store (s32))
|
2017-03-02 06:56:20 +08:00
|
|
|
|
|
|
|
; Make sure we move the paired stores next to each other.
|
2017-03-03 05:39:39 +08:00
|
|
|
; CHECK: t2STRi12 killed %12,
|
2017-03-02 06:56:20 +08:00
|
|
|
; CHECK-NEXT: t2STRi12 killed %13,
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
tBX_RET 14, $noreg
|
2017-03-02 06:56:20 +08:00
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: b
|
|
|
|
name: b
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 2
|
2017-03-02 06:56:20 +08:00
|
|
|
tracksRegLiveness: true
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$r0', virtual-reg: '%0' }
|
|
|
|
- { reg: '$r1', virtual-reg: '%1' }
|
|
|
|
- { reg: '$r2', virtual-reg: '%2' }
|
2017-03-02 06:56:20 +08:00
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $r0, $r1, $r2
|
2017-03-02 06:56:20 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%2 : rgpr = COPY $r2
|
|
|
|
%1 : rgpr = COPY $r1
|
|
|
|
%0 : gpr = COPY $r0
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 %1, %0, 0, 14, $noreg :: (store (s32))
|
2018-02-01 06:04:26 +08:00
|
|
|
%10 : rgpr = t2LSLri %2, 1, 14, $noreg, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 killed %10, %0, 4, 14, $noreg :: (store (s32))
|
2018-02-01 06:04:26 +08:00
|
|
|
%3 : rgpr = t2MUL %2, %2, 14, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 %3, %0, 8, 14, $noreg :: (store (s32))
|
2017-03-03 05:39:39 +08:00
|
|
|
|
|
|
|
; Make sure we move the paired stores next to each other, and
|
|
|
|
; insert them in an appropriate location.
|
2019-02-11 17:37:42 +08:00
|
|
|
; CHECK: t2STRi12 {{.*}}, 0
|
2017-03-03 05:39:39 +08:00
|
|
|
; CHECK-NEXT: t2STRi12 {{.*}}, 4
|
|
|
|
; CHECK-NEXT: t2STRi12 {{.*}}, 8
|
|
|
|
; CHECK-NEXT: t2MUL
|
|
|
|
; CHECK-NEXT: t2MOVi32imm
|
|
|
|
|
2019-02-11 17:37:42 +08:00
|
|
|
; CHECK-LIMIT-LABEL: name: b
|
|
|
|
; CHECK-LIMIT: t2STRi12 {{.*}}, 0
|
|
|
|
; CHECK-LIMIT-NEXT: t2STRi12 {{.*}}, 4
|
|
|
|
; CHECK-LIMIT-NEXT: t2MUL
|
|
|
|
; CHECK-LIMIT-NEXT: t2STRi12 {{.*}}, 8
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%4 : rgpr = t2MUL %1, %1, 14, $noreg
|
2017-03-02 06:56:20 +08:00
|
|
|
%5 : rgpr = t2MOVi32imm -858993459
|
2018-02-01 06:04:26 +08:00
|
|
|
%6 : rgpr, %7 : rgpr = t2UMULL killed %3, %5, 14, $noreg
|
|
|
|
%8 : rgpr, %9 : rgpr = t2UMULL killed %4, %5, 14, $noreg
|
|
|
|
%10 : rgpr = t2LSLri %2, 1, 14, $noreg, $noreg
|
|
|
|
%11 : rgpr = t2MOVi 55, 14, $noreg, $noreg
|
|
|
|
%12 : gprnopc = t2ADDrs %11, killed %7, 19, 14, $noreg, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 killed %12, %0, 16, 14, $noreg :: (store (s32))
|
2018-02-01 06:04:26 +08:00
|
|
|
%13 : gprnopc = t2ADDrs %11, killed %9, 19, 14, $noreg, $noreg
|
2021-05-20 10:25:51 +08:00
|
|
|
t2STRi12 killed %13, %0, 20, 14, $noreg :: (store (s32))
|
2017-03-02 06:56:20 +08:00
|
|
|
|
|
|
|
; Make sure we move the paired stores next to each other.
|
2017-03-03 05:39:39 +08:00
|
|
|
; CHECK: t2STRi12 {{.*}}, 16
|
2017-03-02 06:56:20 +08:00
|
|
|
; CHECK-NEXT: t2STRi12 {{.*}}, 20
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
tBX_RET 14, $noreg
|
2017-03-02 06:56:20 +08:00
|
|
|
|
|
|
|
...
|