1
- ; RUN: llc -mtriple=amdgcn < %s | FileCheck %s
2
- ; REQUIRES: asserts
1
+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2
+ ; RUN: llc -mtriple=amdgcn -mcpu=tonga < %s | FileCheck %s
3
3
;
4
4
; This test used to crash with the following assertion:
5
5
; llc: include/llvm/ADT/IntervalMap.h:632: unsigned int llvm::IntervalMapImpl::LeafNode<llvm::SlotIndex, llvm::LiveInterval *, 8, llvm::IntervalMapInfo<llvm::SlotIndex> >::insertFrom(unsigned int &, unsigned int, KeyT, KeyT, ValT) [KeyT = llvm::SlotIndex, ValT = llvm::LiveInterval *, N = 8, Traits = llvm::IntervalMapInfo<llvm::SlotIndex>]: Assertion `(i == Size || Traits::stopLess(b, start(i))) && "Overlapping insert"' failed.
8
8
; (i.e. live interval subranges): subregister defs are not uses for that
9
9
; purpose.
10
10
;
11
- ; Check for a valid output:
12
- ; CHECK: tbuffer_store_format_x
13
-
14
- target triple = "amdgcn--"
15
11
16
12
define amdgpu_gs void @main (i32 inreg %arg ) #0 {
13
+ ; CHECK-LABEL: main:
14
+ ; CHECK: ; %bb.0: ; %main_body
15
+ ; CHECK-NEXT: s_movk_i32 s1, 0x1300
16
+ ; CHECK-NEXT: buffer_load_dword v0, v0, s[0:3], s1 offen
17
+ ; CHECK-NEXT: s_waitcnt vmcnt(0)
18
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:36 glc slc
19
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:48 glc slc
20
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:72 glc slc
21
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:28 glc slc
22
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:64 glc slc
23
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:20 glc slc
24
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:56 glc slc
25
+ ; CHECK-NEXT: tbuffer_store_format_x v0, off, s[0:3], s0 format:[BUF_DATA_FORMAT_32,BUF_NUM_FORMAT_UINT] offset:92 glc slc
26
+ ; CHECK-NEXT: s_endpgm
17
27
main_body:
18
28
%tmp = call float @llvm.amdgcn.s.buffer.load.f32 (<4 x i32 > poison, i32 20 , i32 0 )
19
29
%tmp1 = call float @llvm.amdgcn.s.buffer.load.f32 (<4 x i32 > poison, i32 24 , i32 0 )
@@ -27,17 +37,17 @@ main_body:
27
37
%tmp3 = call i32 @llvm.amdgcn.raw.buffer.load.i32 (<4 x i32 > poison, i32 poison, i32 4864 , i32 0 )
28
38
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 %tmp3 , <4 x i32 > poison, i32 36 , i32 %arg , i32 68 , i32 3 )
29
39
%bc = bitcast <4 x float > %array_vector3 to <4 x i32 >
30
- %tmp4 = extractelement <4 x i32 > %bc , i32 undef
40
+ %tmp4 = extractelement <4 x i32 > %bc , i32 poison
31
41
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 %tmp4 , <4 x i32 > poison, i32 48 , i32 %arg , i32 68 , i32 3 )
32
42
%bc49 = bitcast <4 x float > %array_vector11 to <4 x i32 >
33
- %tmp5 = extractelement <4 x i32 > %bc49 , i32 undef
43
+ %tmp5 = extractelement <4 x i32 > %bc49 , i32 poison
34
44
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 %tmp5 , <4 x i32 > poison, i32 72 , i32 %arg , i32 68 , i32 3 )
35
45
%array_vector21 = insertelement <4 x float > <float 0 .000000e+00 , float poison, float poison, float poison>, float %tmp , i32 1
36
46
%array_vector22 = insertelement <4 x float > %array_vector21 , float poison, i32 2
37
47
%array_vector23 = insertelement <4 x float > %array_vector22 , float poison, i32 3
38
48
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 poison, <4 x i32 > poison, i32 28 , i32 %arg , i32 68 , i32 3 )
39
49
%bc52 = bitcast <4 x float > %array_vector23 to <4 x i32 >
40
- %tmp6 = extractelement <4 x i32 > %bc52 , i32 undef
50
+ %tmp6 = extractelement <4 x i32 > %bc52 , i32 poison
41
51
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 %tmp6 , <4 x i32 > poison, i32 64 , i32 %arg , i32 68 , i32 3 )
42
52
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 poison, <4 x i32 > poison, i32 20 , i32 %arg , i32 68 , i32 3 )
43
53
call void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 poison, <4 x i32 > poison, i32 56 , i32 %arg , i32 68 , i32 3 )
@@ -49,7 +59,7 @@ declare float @llvm.amdgcn.s.buffer.load.f32(<4 x i32>, i32, i32 immarg) #1
49
59
declare i32 @llvm.amdgcn.raw.buffer.load.i32 (<4 x i32 >, i32 , i32 , i32 immarg) #2
50
60
declare void @llvm.amdgcn.raw.tbuffer.store.i32 (i32 , <4 x i32 >, i32 , i32 , i32 immarg, i32 immarg) #3
51
61
52
- attributes #0 = { nounwind "target-cpu" = "tonga" }
62
+ attributes #0 = { nounwind }
53
63
attributes #1 = { nounwind readnone willreturn }
54
64
attributes #2 = { nounwind readonly willreturn }
55
65
attributes #3 = { nounwind willreturn writeonly }
0 commit comments