Skip to content

Commit 42b5b72

Browse files
committed
AMDGPU/GlobalISel: Fix not running -global-isel in global isel test
1 parent edfc21a commit 42b5b72

File tree

1 file changed

+57
-15
lines changed

1 file changed

+57
-15
lines changed

llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.trig.preop.ll

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii < %s | FileCheck -check-prefixes=GCN,CI %s
3-
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji < %s | FileCheck -check-prefixes=GCN,VI %s
4-
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefixes=GCN,GFX9 %s
5-
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10PLUS,GFX10 %s
6-
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX10PLUS,GFX11 %s
2+
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=hawaii < %s | FileCheck -check-prefixes=GCN,CI %s
3+
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=fiji < %s | FileCheck -check-prefixes=GCN,VI %s
4+
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefixes=GCN,GFX9 %s
5+
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10PLUS,GFX10 %s
6+
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX10PLUS,GFX11 %s
77

88
define double @v_trig_preop_f64(double %a, i32 %b) {
99
; GCN-LABEL: v_trig_preop_f64:
@@ -45,7 +45,13 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
4545
; CI-NEXT: s_waitcnt lgkmcnt(0)
4646
; CI-NEXT: v_mov_b32_e32 v0, s2
4747
; CI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], v0
48-
; CI-NEXT: flat_store_dwordx2 v[0:1], v[0:1]
48+
; CI-NEXT: s_add_u32 s0, s0, 4
49+
; CI-NEXT: s_addc_u32 s1, s1, 0
50+
; CI-NEXT: v_mov_b32_e32 v3, s1
51+
; CI-NEXT: v_mov_b32_e32 v2, s0
52+
; CI-NEXT: flat_store_dword v[0:1], v0
53+
; CI-NEXT: s_waitcnt vmcnt(0)
54+
; CI-NEXT: flat_store_dword v[2:3], v1
4955
; CI-NEXT: s_waitcnt vmcnt(0)
5056
; CI-NEXT: s_endpgm
5157
;
@@ -56,7 +62,13 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
5662
; VI-NEXT: s_waitcnt lgkmcnt(0)
5763
; VI-NEXT: v_mov_b32_e32 v0, s2
5864
; VI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], v0
59-
; VI-NEXT: flat_store_dwordx2 v[0:1], v[0:1]
65+
; VI-NEXT: s_add_u32 s0, s0, 4
66+
; VI-NEXT: s_addc_u32 s1, s1, 0
67+
; VI-NEXT: v_mov_b32_e32 v3, s1
68+
; VI-NEXT: v_mov_b32_e32 v2, s0
69+
; VI-NEXT: flat_store_dword v[0:1], v0
70+
; VI-NEXT: s_waitcnt vmcnt(0)
71+
; VI-NEXT: flat_store_dword v[2:3], v1
6072
; VI-NEXT: s_waitcnt vmcnt(0)
6173
; VI-NEXT: s_endpgm
6274
;
@@ -98,14 +110,44 @@ define amdgpu_kernel void @s_trig_preop_f64(double %a, i32 %b) {
98110
}
99111

100112
define amdgpu_kernel void @s_trig_preop_f64_imm(double %a, i32 %b) {
101-
; GCN-LABEL: s_trig_preop_f64_imm:
102-
; GCN: ; %bb.0:
103-
; GCN-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
104-
; GCN-NEXT: s_waitcnt lgkmcnt(0)
105-
; GCN-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
106-
; GCN-NEXT: flat_store_dwordx2 v[0:1], v[0:1]
107-
; GCN-NEXT: s_waitcnt vmcnt(0)
108-
; GCN-NEXT: s_endpgm
113+
; CI-LABEL: s_trig_preop_f64_imm:
114+
; CI: ; %bb.0:
115+
; CI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
116+
; CI-NEXT: s_waitcnt lgkmcnt(0)
117+
; CI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
118+
; CI-NEXT: s_add_u32 s0, s0, 4
119+
; CI-NEXT: s_addc_u32 s1, s1, 0
120+
; CI-NEXT: v_mov_b32_e32 v3, s1
121+
; CI-NEXT: v_mov_b32_e32 v2, s0
122+
; CI-NEXT: flat_store_dword v[0:1], v0
123+
; CI-NEXT: s_waitcnt vmcnt(0)
124+
; CI-NEXT: flat_store_dword v[2:3], v1
125+
; CI-NEXT: s_waitcnt vmcnt(0)
126+
; CI-NEXT: s_endpgm
127+
;
128+
; VI-LABEL: s_trig_preop_f64_imm:
129+
; VI: ; %bb.0:
130+
; VI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
131+
; VI-NEXT: s_waitcnt lgkmcnt(0)
132+
; VI-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
133+
; VI-NEXT: s_add_u32 s0, s0, 4
134+
; VI-NEXT: s_addc_u32 s1, s1, 0
135+
; VI-NEXT: v_mov_b32_e32 v3, s1
136+
; VI-NEXT: v_mov_b32_e32 v2, s0
137+
; VI-NEXT: flat_store_dword v[0:1], v0
138+
; VI-NEXT: s_waitcnt vmcnt(0)
139+
; VI-NEXT: flat_store_dword v[2:3], v1
140+
; VI-NEXT: s_waitcnt vmcnt(0)
141+
; VI-NEXT: s_endpgm
142+
;
143+
; GFX9-LABEL: s_trig_preop_f64_imm:
144+
; GFX9: ; %bb.0:
145+
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x0
146+
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
147+
; GFX9-NEXT: v_trig_preop_f64 v[0:1], s[0:1], 7
148+
; GFX9-NEXT: flat_store_dwordx2 v[0:1], v[0:1]
149+
; GFX9-NEXT: s_waitcnt vmcnt(0)
150+
; GFX9-NEXT: s_endpgm
109151
;
110152
; GFX10-LABEL: s_trig_preop_f64_imm:
111153
; GFX10: ; %bb.0:

0 commit comments

Comments
 (0)