2016-11-08 03:09:27 +08:00
|
|
|
# RUN: llc -run-pass block-placement -march=amdgcn -verify-machineinstrs -o - %s | FileCheck %s
|
|
|
|
--- |
|
|
|
|
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @invert_br_undef_vcc(float %cond, i32 addrspace(1)* %out) #0 {
|
2016-11-08 03:09:27 +08:00
|
|
|
entry:
|
|
|
|
br i1 undef, label %if, label %else, !structurizecfg.uniform !0, !amdgpu.uniform !0
|
|
|
|
|
|
|
|
else: ; preds = %entry
|
|
|
|
store volatile i32 100, i32 addrspace(1)* undef
|
|
|
|
br label %done, !structurizecfg.uniform !0
|
|
|
|
|
|
|
|
if: ; preds = %entry
|
|
|
|
store volatile i32 9, i32 addrspace(1)* undef
|
|
|
|
br label %done, !structurizecfg.uniform !0
|
|
|
|
|
|
|
|
done: ; preds = %if, %else
|
|
|
|
%value = phi i32 [ 0, %if ], [ 1, %else ]
|
|
|
|
store i32 %value, i32 addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #0 = { nounwind }
|
|
|
|
|
|
|
|
!0 = !{}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: invert_br_undef_vcc
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: S_CBRANCH_VCCZ %bb.1, implicit undef $vcc
|
2016-11-08 03:09:27 +08:00
|
|
|
|
|
|
|
name: invert_br_undef_vcc
|
[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: 1
|
2016-11-08 03:09:27 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$sgpr0_sgpr1' }
|
2016-11-08 03:09:27 +08:00
|
|
|
frameInfo:
|
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $sgpr0_sgpr1
|
2016-11-08 03:09:27 +08:00
|
|
|
|
2019-05-01 06:08:23 +08:00
|
|
|
$sgpr0_sgpr1 = S_LOAD_DWORDX2_IMM killed $sgpr0_sgpr1, 11, 0, 0 :: (non-temporal dereferenceable invariant load 8 from `i64 addrspace(4)* undef`)
|
2018-02-01 06:04:26 +08:00
|
|
|
$sgpr7 = S_MOV_B32 61440
|
|
|
|
$sgpr6 = S_MOV_B32 -1
|
|
|
|
S_CBRANCH_VCCNZ %bb.2, implicit undef $vcc
|
2016-11-08 03:09:27 +08:00
|
|
|
|
|
|
|
bb.1.else:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $sgpr6, $sgpr7, $sgpr0_sgpr1_sgpr2_sgpr3:0x00000003
|
2016-11-08 03:09:27 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$vgpr0 = V_MOV_B32_e32 100, implicit $exec
|
2019-05-01 06:08:23 +08:00
|
|
|
BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `i32 addrspace(1)* undef`)
|
2018-02-01 06:04:26 +08:00
|
|
|
$vgpr0 = V_MOV_B32_e32 1, implicit $exec
|
2017-12-05 01:18:51 +08:00
|
|
|
S_BRANCH %bb.3
|
2016-11-08 03:09:27 +08:00
|
|
|
|
|
|
|
bb.2.if:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $sgpr6, $sgpr7, $sgpr0_sgpr1_sgpr2_sgpr3:0x00000003
|
2016-11-08 03:09:27 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$vgpr0 = V_MOV_B32_e32 9, implicit $exec
|
2019-05-01 06:08:23 +08:00
|
|
|
BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `i32 addrspace(1)* undef`)
|
2018-02-01 06:04:26 +08:00
|
|
|
$vgpr0 = V_MOV_B32_e32 0, implicit $exec
|
2016-11-08 03:09:27 +08:00
|
|
|
|
|
|
|
bb.3.done:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3:0x00000003
|
2016-11-08 03:09:27 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$sgpr3 = S_MOV_B32 61440
|
|
|
|
$sgpr2 = S_MOV_B32 -1
|
2019-05-01 06:08:23 +08:00
|
|
|
BUFFER_STORE_DWORD_OFFSET killed $vgpr0, killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4 into %ir.out)
|
[AMDGPU] Add support for immediate operand for S_ENDPGM
Summary:
Add support for immediate operand in S_ENDPGM
Change-Id: I0c56a076a10980f719fb2a8f16407e9c301013f6
Reviewers: alexshap
Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, eraman, arphaman, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59213
llvm-svn: 355902
2019-03-12 17:52:58 +08:00
|
|
|
S_ENDPGM 0
|
2016-11-08 03:09:27 +08:00
|
|
|
|
|
|
|
...
|