2019-01-17 17:45:17 +08:00
|
|
|
# RUN: llc -o - %s -mtriple=aarch64-windows -start-after=prologepilog \
|
|
|
|
# RUN: -disable-branch-fold -filetype=obj \
|
2020-07-20 15:39:14 +08:00
|
|
|
# RUN: | llvm-readobj --unwind - | FileCheck %s
|
2019-01-17 17:45:17 +08:00
|
|
|
# Check that non-identical multiple epilgoues are correctly shared in .xdata.
|
|
|
|
|
|
|
|
# CHECK: ExceptionData {
|
|
|
|
# CHECK-NEXT: FunctionLength: 160
|
|
|
|
# CHECK-NEXT: Version: 0
|
|
|
|
# CHECK-NEXT: ExceptionData: No
|
|
|
|
# CHECK-NEXT: EpiloguePacked: No
|
|
|
|
# CHECK-NEXT: EpilogueScopes: 2
|
|
|
|
# CHECK-NEXT: ByteCodeLength: 44
|
|
|
|
# CHECK-NEXT: Prologue [
|
|
|
|
# CHECK-NEXT: 0xc80c ; stp x19, x20, [sp, #96]
|
|
|
|
# CHECK-NEXT: 0xc88a ; stp x21, x22, [sp, #80]
|
|
|
|
# CHECK-NEXT: 0xc908 ; stp x23, x24, [sp, #64]
|
|
|
|
# CHECK-NEXT: 0xc986 ; stp x25, x26, [sp, #48]
|
|
|
|
# CHECK-NEXT: 0xca04 ; stp x27, x28, [sp, #32]
|
|
|
|
# CHECK-NEXT: 0xd802 ; stp d8, d9, [sp, #16]
|
|
|
|
# CHECK-NEXT: 0xda8d ; stp d10, d11, [sp, #-112]!
|
|
|
|
# CHECK-NEXT: 0xe4 ; end
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: EpilogueScopes [
|
|
|
|
# CHECK-NEXT: EpilogueScope {
|
|
|
|
# CHECK-NEXT: StartOffset: 16
|
|
|
|
# CHECK-NEXT: EpilogueStartIndex: 15
|
|
|
|
# CHECK-NEXT: Opcodes [
|
|
|
|
# CHECK-NEXT: 0xc80c ; ldp x19, x20, [sp, #96]
|
|
|
|
# CHECK-NEXT: 0xc88a ; ldp x21, x22, [sp, #80]
|
|
|
|
# CHECK-NEXT: 0xc908 ; ldp x23, x24, [sp, #64]
|
|
|
|
# CHECK-NEXT: 0xc986 ; ldp x25, x26, [sp, #48]
|
|
|
|
# CHECK-NEXT: 0xd802 ; ldp d8, d9, [sp, #16]
|
|
|
|
# CHECK-NEXT: 0xda8d ; ldp d10, d11, [sp], #112
|
|
|
|
# CHECK-NEXT: 0xe4 ; end
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: EpilogueScope {
|
|
|
|
# CHECK-NEXT: StartOffset: 32
|
|
|
|
# CHECK-NEXT: EpilogueStartIndex: 28
|
|
|
|
# CHECK-NEXT: Opcodes [
|
|
|
|
# CHECK-NEXT: 0xc80c ; ldp x19, x20, [sp, #96]
|
|
|
|
# CHECK-NEXT: 0xc88a ; ldp x21, x22, [sp, #80]
|
|
|
|
# CHECK-NEXT: 0xc908 ; ldp x23, x24, [sp, #64]
|
|
|
|
# CHECK-NEXT: 0xc986 ; ldp x25, x26, [sp, #48]
|
|
|
|
# CHECK-NEXT: 0xca04 ; ldp x27, x28, [sp, #32]
|
|
|
|
# CHECK-NEXT: 0xd802 ; ldp d8, d9, [sp, #16]
|
|
|
|
# CHECK-NEXT: 0xda8d ; ldp d10, d11, [sp], #112
|
|
|
|
# CHECK-NEXT: 0xe4 ; end
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test
|
[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: 4
|
2019-01-17 17:45:17 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
failedISel: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
hasWinCFI: true
|
|
|
|
registers:
|
|
|
|
liveins:
|
|
|
|
- { reg: '$w0', virtual-reg: '' }
|
|
|
|
frameInfo:
|
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 112
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 8
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
stackProtector: ''
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: true
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
localFrameSize: 0
|
|
|
|
savePoint: ''
|
|
|
|
restorePoint: ''
|
|
|
|
fixedStack:
|
|
|
|
stack:
|
|
|
|
- { id: 0, name: '', type: spill-slot, offset: -8, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x19', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 1, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x20', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 2, name: '', type: spill-slot, offset: -24, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x21', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 3, name: '', type: spill-slot, offset: -32, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x22', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 4, name: '', type: spill-slot, offset: -40, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x23', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 5, name: '', type: spill-slot, offset: -48, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x24', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 6, name: '', type: spill-slot, offset: -56, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x25', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 7, name: '', type: spill-slot, offset: -64, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x26', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 8, name: '', type: spill-slot, offset: -72, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x27', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 9, name: '', type: spill-slot, offset: -80, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$x28', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 10, name: '', type: spill-slot, offset: -88, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$d8', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 11, name: '', type: spill-slot, offset: -96, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$d9', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 12, name: '', type: spill-slot, offset: -104, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$d10', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
- { id: 13, name: '', type: spill-slot, offset: -112, size: 8, alignment: 8,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '$d11', callee-saved-restored: true,
|
2019-01-17 17:45:17 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
|
|
|
|
constants:
|
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
|
|
|
successors: %bb.2(0x40000000), %bb.1(0x40000000)
|
|
|
|
liveins: $x0, $x1, $d0, $d1, $d10, $d11, $d8, $d9, $x27, $x28, $x25, $x26, $x23, $x24, $x21, $x22, $x19, $x20
|
|
|
|
|
2021-05-20 10:25:51 +08:00
|
|
|
early-clobber $sp = frame-setup STPDpre killed $d10, killed $d11, $sp, -14 :: (store (s64) into %stack.12), (store (s64) into %stack.13)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveFRegP_X 10, 11, -112
|
2021-05-20 10:25:51 +08:00
|
|
|
frame-setup STPDi killed $d8, killed $d9, $sp, 2 :: (store (s64) into %stack.10), (store (s64) into %stack.11)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveFRegP 8, 9, 16
|
2021-05-20 10:25:51 +08:00
|
|
|
frame-setup STPXi killed $x27, killed $x28, $sp, 4 :: (store (s64) into %stack.8), (store (s64) into %stack.9)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveRegP 27, 28, 32
|
2021-05-20 10:25:51 +08:00
|
|
|
frame-setup STPXi killed $x25, killed $x26, $sp, 6 :: (store (s64) into %stack.6), (store (s64) into %stack.7)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveRegP 25, 26, 48
|
2021-05-20 10:25:51 +08:00
|
|
|
frame-setup STPXi killed $x23, killed $x24, $sp, 8 :: (store (s64) into %stack.4), (store (s64) into %stack.5)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveRegP 23, 24, 64
|
2021-05-20 10:25:51 +08:00
|
|
|
frame-setup STPXi killed $x21, killed $x22, $sp, 10 :: (store (s64) into %stack.2), (store (s64) into %stack.3)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveRegP 21, 22, 80
|
2021-05-20 10:25:51 +08:00
|
|
|
frame-setup STPXi killed $x19, killed $x20, $sp, 12 :: (store (s64) into %stack.0), (store (s64) into %stack.1)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-setup SEH_SaveRegP 19, 20, 96
|
|
|
|
frame-setup SEH_PrologEnd
|
|
|
|
frame-setup CFI_INSTRUCTION def_cfa_offset 112
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w19, -8
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w20, -16
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w21, -24
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w22, -32
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w23, -40
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w24, -48
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w25, -56
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w26, -64
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w27, -72
|
|
|
|
frame-setup CFI_INSTRUCTION offset $w28, -80
|
|
|
|
frame-setup CFI_INSTRUCTION offset $b8, -88
|
|
|
|
frame-setup CFI_INSTRUCTION offset $b9, -96
|
|
|
|
frame-setup CFI_INSTRUCTION offset $b10, -104
|
|
|
|
frame-setup CFI_INSTRUCTION offset $b11, -112
|
|
|
|
$x19 = ADDXrr $x0, killed $x1
|
|
|
|
$d8 = FADDDrr killed $d0, $d1
|
|
|
|
$d9 = FADDDrr $d8, $d1
|
|
|
|
$d10 = FADDDrr $d9, $d8
|
|
|
|
$d11 = FADDDrr killed $d9, $d10
|
|
|
|
$x20 = SUBSXrr $x19, killed $x0, implicit-def $nzcv
|
|
|
|
Bcc 1, %bb.2, implicit killed $nzcv
|
|
|
|
B %bb.1
|
|
|
|
|
|
|
|
bb.1:
|
|
|
|
liveins: $x19, $x20
|
|
|
|
|
|
|
|
$x21 = ADDXrr $x20, killed $x19
|
|
|
|
$x22 = ADDXrr $x21, killed $x20
|
|
|
|
$x23 = ADDXrr $x22, killed $x21
|
|
|
|
$x24 = ADDXrr $x23, killed $x22
|
|
|
|
$x25 = ADDXrr $x24, killed $x23
|
|
|
|
$x26 = ADDXrr $x25, killed $x24
|
|
|
|
$x27 = ADDXrr $x26, killed $x25
|
|
|
|
$x28 = ADDXrr $x27, killed $x26
|
|
|
|
$x0 = COPY $x28
|
|
|
|
frame-destroy SEH_EpilogStart
|
2021-05-20 10:25:51 +08:00
|
|
|
$x19, $x20 = frame-destroy LDPXi $sp, 12 :: (load (s64) from %stack.0), (load (s64) from %stack.1)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 19, 20, 96
|
2021-05-20 10:25:51 +08:00
|
|
|
$x21, $x22 = frame-destroy LDPXi $sp, 10 :: (load (s64) from %stack.2), (load (s64) from %stack.3)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 21, 22, 80
|
2021-05-20 10:25:51 +08:00
|
|
|
$x23, $x24 = frame-destroy LDPXi $sp, 8 :: (load (s64) from %stack.4), (load (s64) from %stack.5)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 23, 24, 64
|
2021-05-20 10:25:51 +08:00
|
|
|
$x25, $x26 = frame-destroy LDPXi $sp, 6 :: (load (s64) from %stack.6), (load (s64) from %stack.7)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 25, 26, 48
|
2021-05-20 10:25:51 +08:00
|
|
|
$x27, $x28 = frame-destroy LDPXi $sp, 4 :: (load (s64) from %stack.8), (load (s64) from %stack.9)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 27, 28, 32
|
2021-05-20 10:25:51 +08:00
|
|
|
$d8, $d9 = frame-destroy LDPDi $sp, 2 :: (load (s64) from %stack.10), (load (s64) from %stack.11)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveFRegP 8, 9, 16
|
2021-05-20 10:25:51 +08:00
|
|
|
early-clobber $sp, $d10, $d11 = frame-destroy LDPDpost $sp, 14 :: (load (s64) from %stack.12), (load (s64) from %stack.13)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveFRegP_X 10, 11, -112
|
|
|
|
frame-destroy SEH_EpilogEnd
|
|
|
|
RET_ReallyLR implicit $x0
|
|
|
|
|
|
|
|
bb.2:
|
2020-04-21 09:27:07 +08:00
|
|
|
liveins: $d11
|
2019-01-17 17:45:17 +08:00
|
|
|
|
|
|
|
$x0 = COPY $d11
|
2020-04-21 09:27:07 +08:00
|
|
|
$x0 = ADDXrr $x0, $x0
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_EpilogStart
|
2021-05-20 10:25:51 +08:00
|
|
|
$x19, $x20 = frame-destroy LDPXi $sp, 12 :: (load (s64) from %stack.0), (load (s64) from %stack.1)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 19, 20, 96
|
2021-05-20 10:25:51 +08:00
|
|
|
$x21, $x22 = frame-destroy LDPXi $sp, 10 :: (load (s64) from %stack.2), (load (s64) from %stack.3)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 21, 22, 80
|
2021-05-20 10:25:51 +08:00
|
|
|
$x23, $x24 = frame-destroy LDPXi $sp, 8 :: (load (s64) from %stack.4), (load (s64) from %stack.5)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 23, 24, 64
|
2021-05-20 10:25:51 +08:00
|
|
|
$x25, $x26 = frame-destroy LDPXi $sp, 6 :: (load (s64) from %stack.6), (load (s64) from %stack.7)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveRegP 25, 26, 48
|
2021-05-20 10:25:51 +08:00
|
|
|
$d8, $d9 = frame-destroy LDPDi $sp, 2 :: (load (s64) from %stack.10), (load (s64) from %stack.11)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveFRegP 8, 9, 16
|
2021-05-20 10:25:51 +08:00
|
|
|
early-clobber $sp, $d10, $d11 = frame-destroy LDPDpost $sp, 14 :: (load (s64) from %stack.12), (load (s64) from %stack.13)
|
2019-01-17 17:45:17 +08:00
|
|
|
frame-destroy SEH_SaveFRegP_X 10, 11, -112
|
|
|
|
frame-destroy SEH_EpilogEnd
|
|
|
|
RET_ReallyLR implicit $x0
|
|
|
|
|
|
|
|
...
|