annotate llvm/test/CodeGen/AMDGPU/merge-store-crash.ll @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck %s
anatofuz
parents:
diff changeset
2 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 ; This is used to crash in LiveIntervalAnalysis via SILoadStoreOptimizer
anatofuz
parents:
diff changeset
5 ; while fixing up the merge of two ds_write instructions.
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 @tess_lds = external addrspace(3) global [8192 x i32]
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 ; CHECK-LABEL: {{^}}main:
anatofuz
parents:
diff changeset
10 ; CHECK-DAG: ds_write_b32
anatofuz
parents:
diff changeset
11 ; CHECK-DAG: ds_write_b32
anatofuz
parents:
diff changeset
12 ; CHECK-DAG: v_mov_b32_e32 v1, v0
anatofuz
parents:
diff changeset
13 ; CHECK: tbuffer_store_format_xyzw v[0:3],
anatofuz
parents:
diff changeset
14 define amdgpu_vs void @main(i32 inreg %arg) {
anatofuz
parents:
diff changeset
15 main_body:
anatofuz
parents:
diff changeset
16 %tmp = load float, float addrspace(3)* undef, align 4
anatofuz
parents:
diff changeset
17 %tmp1 = load float, float addrspace(3)* undef, align 4
anatofuz
parents:
diff changeset
18 store float %tmp, float addrspace(3)* null, align 4
anatofuz
parents:
diff changeset
19 %tmp2 = bitcast float %tmp to i32
anatofuz
parents:
diff changeset
20 %tmp3 = add nuw nsw i32 0, 1
anatofuz
parents:
diff changeset
21 %tmp4 = zext i32 %tmp3 to i64
anatofuz
parents:
diff changeset
22 %tmp5 = getelementptr [8192 x i32], [8192 x i32] addrspace(3)* @tess_lds, i64 0, i64 %tmp4
anatofuz
parents:
diff changeset
23 %tmp6 = bitcast i32 addrspace(3)* %tmp5 to float addrspace(3)*
anatofuz
parents:
diff changeset
24 store float %tmp1, float addrspace(3)* %tmp6, align 4
anatofuz
parents:
diff changeset
25 %tmp7 = bitcast float %tmp1 to i32
anatofuz
parents:
diff changeset
26 %tmp8 = insertelement <4 x i32> undef, i32 %tmp2, i32 0
anatofuz
parents:
diff changeset
27 %tmp9 = insertelement <4 x i32> %tmp8, i32 %tmp7, i32 1
anatofuz
parents:
diff changeset
28 %tmp10 = insertelement <4 x i32> %tmp9, i32 undef, i32 2
anatofuz
parents:
diff changeset
29 %tmp11 = insertelement <4 x i32> %tmp10, i32 undef, i32 3
anatofuz
parents:
diff changeset
30 call void @llvm.amdgcn.tbuffer.store.v4i32(<4 x i32> %tmp11, <4 x i32> undef, i32 undef, i32 0, i32 %arg, i32 0, i32 14, i32 4, i1 1, i1 1)
anatofuz
parents:
diff changeset
31 ret void
anatofuz
parents:
diff changeset
32 }
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 ; Function Attrs: nounwind
anatofuz
parents:
diff changeset
35 declare void @llvm.amdgcn.tbuffer.store.v4i32(<4 x i32>, <4 x i32>, i32, i32, i32, i32, i32, i32, i1, i1) #0
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 attributes #0 = { nounwind }