2018-04-28 01:59:15 +08:00
|
|
|
# RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck %s
|
2016-12-06 04:23:10 +08:00
|
|
|
--- |
|
2017-02-22 08:02:21 +08:00
|
|
|
define amdgpu_ps <4 x float> @exp_done_waitcnt(<4 x i32> inreg, <4 x
|
|
|
|
i32> inreg, i32 inreg %w, float %v) #0 {
|
2016-12-06 04:23:10 +08:00
|
|
|
%a = load volatile float, float addrspace(1)* undef
|
|
|
|
%b = load volatile float, float addrspace(1)* undef
|
|
|
|
%c = load volatile float, float addrspace(1)* undef
|
|
|
|
%d = load volatile float, float addrspace(1)* undef
|
2017-02-22 08:02:21 +08:00
|
|
|
call void @llvm.amdgcn.exp.f32(i32 15, i32 1, float %a, float %b, float %c, float %d, i1 true, i1 false)
|
2016-12-06 04:23:10 +08:00
|
|
|
ret <4 x float> <float 5.000000e-01, float 1.000000e+00, float 2.000000e+00, float 4.000000e+00>
|
|
|
|
}
|
|
|
|
|
2017-02-22 08:02:21 +08:00
|
|
|
declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #0
|
2016-12-06 04:23:10 +08:00
|
|
|
|
2017-02-22 08:02:21 +08:00
|
|
|
attributes #0 = { nounwind }
|
2016-12-06 04:23:10 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
|
|
|
|
# CHECK-LABEL: name: exp_done_waitcnt{{$}}
|
|
|
|
# CHECK: EXP_DONE
|
|
|
|
# CHECK-NEXT: S_WAITCNT 3855
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: $vgpr0 = V_MOV_B32
|
|
|
|
# CHECK: $vgpr1 = V_MOV_B32
|
|
|
|
# CHECK: $vgpr2 = V_MOV_B32
|
|
|
|
# CHECK: $vgpr3 = V_MOV_B32
|
2016-12-06 04:23:10 +08:00
|
|
|
name: exp_done_waitcnt
|
[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-12-06 04:23:10 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
|
|
|
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 (%ir-block.2):
|
2018-02-01 06:04:26 +08:00
|
|
|
$sgpr3 = S_MOV_B32 61440
|
|
|
|
$sgpr2 = S_MOV_B32 -1
|
[AMDGPU] Extend buffer intrinsics with swizzling
Summary:
Extend cachepolicy operand in the new VMEM buffer intrinsics
to supply information whether the buffer data is swizzled.
Also, propagate this information to MIR.
Intrinsics updated:
int_amdgcn_raw_buffer_load
int_amdgcn_raw_buffer_load_format
int_amdgcn_raw_buffer_store
int_amdgcn_raw_buffer_store_format
int_amdgcn_raw_tbuffer_load
int_amdgcn_raw_tbuffer_store
int_amdgcn_struct_buffer_load
int_amdgcn_struct_buffer_load_format
int_amdgcn_struct_buffer_store
int_amdgcn_struct_buffer_store_format
int_amdgcn_struct_tbuffer_load
int_amdgcn_struct_tbuffer_store
Furthermore, disable merging of VMEM buffer instructions
in SI Load/Store optimizer, if the "swizzled" bit on the instruction
is on.
The default value of the bit is 0, meaning that data in buffer
is linear and buffer instructions can be merged.
There is no difference in the generated code with this commit.
However, in the future it will be expected that front-ends
use buffer intrinsics with correct "swizzled" bit set.
Reviewers: arsenm, nhaehnle, tpr
Reviewed By: nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, arphaman, jfb, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68200
llvm-svn: 373491
2019-10-03 01:22:36 +08:00
|
|
|
$vgpr0 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
|
|
|
|
$vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
|
|
|
|
$vgpr2 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
|
|
|
|
$vgpr3 = BUFFER_LOAD_DWORD_OFFSET killed $sgpr0_sgpr1_sgpr2_sgpr3, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4 from `float addrspace(1)* undef`)
|
2018-02-01 06:04:26 +08:00
|
|
|
EXP_DONE 0, killed $vgpr0, killed $vgpr1, killed $vgpr2, killed $vgpr3, -1, -1, 15, implicit $exec
|
|
|
|
$vgpr0 = V_MOV_B32_e32 1056964608, implicit $exec
|
|
|
|
$vgpr1 = V_MOV_B32_e32 1065353216, implicit $exec
|
|
|
|
$vgpr2 = V_MOV_B32_e32 1073741824, implicit $exec
|
|
|
|
$vgpr3 = V_MOV_B32_e32 1082130432, implicit $exec
|
|
|
|
SI_RETURN_TO_EPILOG killed $vgpr0, killed $vgpr1, killed $vgpr2, killed $vgpr3
|
2016-12-06 04:23:10 +08:00
|
|
|
|
|
|
|
...
|