brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.9 KiB · c4f6079 Raw
85 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefix=GCN %s2 3; GCN-LABEL: {{^}}adjust_writemask_crash_0_nochain:4; GCN: image_get_lod v0, v{{[0-9]+}}, s{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}} dmask:0x25; GCN-NOT: v16; GCN-NOT: v07; GCN: buffer_store_dword v08define amdgpu_ps void @adjust_writemask_crash_0_nochain() #0 {9main_body:10  %tmp = call <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32 3, float poison, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)11  %tmp1 = bitcast <2 x float> %tmp to <2 x i32>12  %tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>13  %tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>14  %tmp4 = extractelement <4 x float> %tmp3, i32 015  store volatile float %tmp4, ptr addrspace(1) poison16  ret void17}18 19; GCN-LABEL: {{^}}adjust_writemask_crash_1_nochain:20; GCN: image_get_lod v0, v{{[0-9]+}}, s{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}} dmask:0x121; GCN-NOT: v122; GCN-NOT: v023; GCN: buffer_store_dword v024define amdgpu_ps void @adjust_writemask_crash_1_nochain() #0 {25main_body:26  %tmp = call <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32 3, float poison, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)27  %tmp1 = bitcast <2 x float> %tmp to <2 x i32>28  %tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>29  %tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>30  %tmp4 = extractelement <4 x float> %tmp3, i32 131  store volatile float %tmp4, ptr addrspace(1) poison32  ret void33}34 35; GCN-LABEL: {{^}}adjust_writemask_crash_0_chain:36; GCN: image_sample v0, v{{[0-9]+}}, s{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}} dmask:0x237; GCN-NOT: v138; GCN-NOT: v039; GCN: buffer_store_dword v040define amdgpu_ps void @adjust_writemask_crash_0_chain() #0 {41main_body:42  %tmp = call <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32 3, float poison, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)43  %tmp1 = bitcast <2 x float> %tmp to <2 x i32>44  %tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>45  %tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>46  %tmp4 = extractelement <4 x float> %tmp3, i32 047  store volatile float %tmp4, ptr addrspace(1) poison48  ret void49}50 51; GCN-LABEL: {{^}}adjust_writemask_crash_1_chain:52; GCN: image_sample v0, v{{[0-9]+}}, s{{\[[0-9]+:[0-9]+\]}}, s{{\[[0-9]+:[0-9]+\]}} dmask:0x153; GCN-NOT: v154; GCN-NOT: v055; GCN: buffer_store_dword v056define amdgpu_ps void @adjust_writemask_crash_1_chain() #0 {57main_body:58  %tmp = call <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32 3, float poison, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)59  %tmp1 = bitcast <2 x float> %tmp to <2 x i32>60  %tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> poison, <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>61  %tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>62  %tmp4 = extractelement <4 x float> %tmp3, i32 163  store volatile float %tmp4, ptr addrspace(1) poison64  ret void65}66 67define amdgpu_ps void @adjust_writemask_crash_0_v4() #0 {68main_body:69  %tmp = call <4 x float> @llvm.amdgcn.image.getlod.1d.v4f32.f32(i32 5, float poison, <8 x i32> poison, <4 x i32> poison, i1 0, i32 0, i32 0)70  %tmp1 = bitcast <4 x float> %tmp to <4 x i32>71  %tmp2 = shufflevector <4 x i32> %tmp1, <4 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 poison, i32 poison>72  %tmp3 = bitcast <4 x i32> %tmp2 to <4 x float>73  %tmp4 = extractelement <4 x float> %tmp3, i32 074  store volatile float %tmp4, ptr addrspace(1) poison75  ret void76}77 78 79declare <2 x float> @llvm.amdgcn.image.sample.1d.v2f32.f32(i32, float, <8 x i32>, <4 x i32>, i1, i32, i32) #180declare <2 x float> @llvm.amdgcn.image.getlod.1d.v2f32.f32(i32, float, <8 x i32>, <4 x i32>, i1, i32, i32) #181declare <4 x float> @llvm.amdgcn.image.getlod.1d.v4f32.f32(i32, float, <8 x i32>, <4 x i32>, i1, i32, i32) #182 83attributes #0 = { nounwind }84attributes #1 = { nounwind readonly }85