diff options
| author | Tom Stellard <thomas.stellard@amd.com> | 2016-06-10 00:01:04 +0000 |
|---|---|---|
| committer | Tom Stellard <thomas.stellard@amd.com> | 2016-06-10 00:01:04 +0000 |
| commit | 26a2ab74772b6f410feea70c8ca79ecfe71d4028 (patch) | |
| tree | 1774b0687536eaa6e361abae927e46cf89ae394d /llvm/test | |
| parent | 4e26dd34a0081218acc3f825aabbfc90db67133f (diff) | |
| download | bcm5719-llvm-26a2ab74772b6f410feea70c8ca79ecfe71d4028.tar.gz bcm5719-llvm-26a2ab74772b6f410feea70c8ca79ecfe71d4028.zip | |
AMDGPU/SI: Make sure to emit TargetConstant nodes when matching ds_*permute
Summary:
This fixes a bug with ds_*permute instructions where if it was passed a
constant address, then the offset operand would get assigned a register
operand instead of an immediate.
Reviewers: scchan, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D19994
llvm-svn: 272349
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.ll b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.ll index e2c535baaa8..92d3fc8b107 100644 --- a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.ll +++ b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.bpermute.ll @@ -21,4 +21,13 @@ define void @ds_bpermute_imm_offset(i32 addrspace(1)* %out, i32 %base_index, i32 ret void } +; CHECK-LABEL: {{^}}ds_bpermute_imm_index: +; CHECK: ds_bpermute_b32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}} offset:64 +; CHECK: s_waitcnt lgkmcnt +define void @ds_bpermute_imm_index(i32 addrspace(1)* %out, i32 %base_index, i32 %src) nounwind { + %bpermute = call i32 @llvm.amdgcn.ds.bpermute(i32 64, i32 %src) #0 + store i32 %bpermute, i32 addrspace(1)* %out, align 4 + ret void +} + attributes #0 = { nounwind readnone convergent } |

