2019-01-02 18:07:23 +01:00
|
|
|
# RUN: llc -verify-machineinstrs -start-before=ppc-pre-emit-peephole %s -o - | FileCheck %s
|
|
|
|
--- |
|
|
|
|
target datalayout = "e-m:e-i64:64-n32:64"
|
|
|
|
target triple = "powerpc64le-unknown-linux-gnu"
|
|
|
|
|
|
|
|
declare signext i32 @callee(i32 signext)
|
|
|
|
|
|
|
|
define signext i32 @func(i32 signext %v) {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: func
|
[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 13:16:48 +02:00
|
|
|
alignment: 16
|
2019-01-02 18:07:23 +01:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
failedISel: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
liveins:
|
|
|
|
- { reg: '$x3', virtual-reg: '' }
|
|
|
|
frameInfo:
|
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 48
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: true
|
|
|
|
hasCalls: true
|
|
|
|
stackProtector: ''
|
|
|
|
maxCallFrameSize: 32
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
localFrameSize: 0
|
|
|
|
savePoint: ''
|
|
|
|
restorePoint: ''
|
|
|
|
fixedStack:
|
2019-06-17 11:13:29 +02:00
|
|
|
- { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16, stack-id: default,
|
2019-01-02 18:07:23 +01:00
|
|
|
callee-saved-register: '$x30', callee-saved-restored: true, debug-info-variable: '',
|
|
|
|
debug-info-expression: '', debug-info-location: '' }
|
|
|
|
stack:
|
|
|
|
constants:
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
successors: %bb.2(0x30000000), %bb.1(0x50000000)
|
|
|
|
liveins: $x3, $x30
|
|
|
|
|
|
|
|
; bc should be converted into b
|
|
|
|
; CHECK-LABEL: func
|
|
|
|
; CHECK: # %bb.1
|
|
|
|
; CHECK: creqv
|
|
|
|
; CHECK-NOT: bc
|
|
|
|
; CHECK: b .LBB0_3
|
|
|
|
; CHECK: .LBB0_2
|
|
|
|
|
|
|
|
$x0 = MFLR8 implicit $lr8
|
|
|
|
STD killed $x0, 16, $x1
|
|
|
|
$x1 = STDU $x1, -48, $x1
|
2021-05-20 04:25:51 +02:00
|
|
|
STD killed $x30, 32, $x1 :: (store (s64) into %fixed-stack.0, align 16)
|
2019-01-02 18:07:23 +01:00
|
|
|
$x30 = OR8 $x3, $x3
|
2020-04-07 15:57:56 +02:00
|
|
|
BL8_NOP @callee, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def $x3
|
2019-01-02 18:07:23 +01:00
|
|
|
renamable $cr0 = CMPLWI renamable $r3, 0
|
|
|
|
BCC 76, killed renamable $cr0, %bb.2
|
|
|
|
|
|
|
|
bb.1:
|
|
|
|
successors: %bb.5(0x40000000), %bb.2(0x40000000)
|
|
|
|
liveins: $x3
|
|
|
|
|
|
|
|
renamable $x3 = EXTSW_32_64 killed renamable $r3, implicit $x3
|
2020-04-07 15:57:56 +02:00
|
|
|
BL8_NOP @callee, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def $x3
|
2019-01-02 18:07:23 +01:00
|
|
|
renamable $cr2un = CRSET
|
|
|
|
$cr2gt = CROR $cr2un, $cr2un
|
|
|
|
$x30 = OR8 killed $x3, $x3
|
|
|
|
BC killed renamable $cr2un, %bb.5
|
|
|
|
B %bb.2
|
|
|
|
|
|
|
|
bb.4:
|
|
|
|
successors: %bb.5(0x80000000)
|
|
|
|
liveins: $x30
|
|
|
|
|
|
|
|
$x3 = LI8 0
|
2020-04-07 15:57:56 +02:00
|
|
|
BL8_NOP @callee, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def dead $x3
|
2019-01-02 18:07:23 +01:00
|
|
|
|
|
|
|
bb.5:
|
2020-04-24 10:03:02 +02:00
|
|
|
liveins: $x30
|
2019-01-02 18:07:23 +01:00
|
|
|
|
|
|
|
renamable $x3 = EXTSW_32_64 killed renamable $r30, implicit $x30
|
2021-05-20 04:25:51 +02:00
|
|
|
$x30 = LD 32, $x1 :: (load (s64) from %fixed-stack.0, align 16)
|
2019-01-02 18:07:23 +01:00
|
|
|
$x1 = ADDI8 $x1, 48
|
|
|
|
$x0 = LD 16, $x1
|
|
|
|
MTLR8 killed $x0, implicit-def $lr8
|
|
|
|
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
|
|
|
|
|
|
|
|
bb.2:
|
|
|
|
successors: %bb.5(0x40000000), %bb.4(0x40000000)
|
|
|
|
liveins: $x30
|
|
|
|
|
|
|
|
renamable $cr0 = CMPWI renamable $r30, -1
|
|
|
|
BCn killed renamable $cr0gt, %bb.4
|
|
|
|
B %bb.5
|
|
|
|
|
|
|
|
...
|