11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefix=GCN %s
3- ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX10 %s
4- ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 < %s | FileCheck -check-prefix=GFX10 %s
3+ ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10,SDAG %s
4+ ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -global-isel -new-reg-bank-select -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10,GISEL %s
5+ ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 < %s | FileCheck -check-prefix=GFX11 %s
56
67define double @v_constained_fadd_f64_fpexcept_strict (double %x , double %y ) #0 {
78; GCN-LABEL: v_constained_fadd_f64_fpexcept_strict:
@@ -15,6 +16,12 @@ define double @v_constained_fadd_f64_fpexcept_strict(double %x, double %y) #0 {
1516; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1617; GFX10-NEXT: v_add_f64 v[0:1], v[0:1], v[2:3]
1718; GFX10-NEXT: s_setpc_b64 s[30:31]
19+ ;
20+ ; GFX11-LABEL: v_constained_fadd_f64_fpexcept_strict:
21+ ; GFX11: ; %bb.0:
22+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
23+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[2:3]
24+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
1825 %val = call double @llvm.experimental.constrained.fadd.f64 (double %x , double %y , metadata !"round.tonearest" , metadata !"fpexcept.strict" )
1926 ret double %val
2027}
@@ -31,6 +38,12 @@ define double @v_constained_fadd_f64_fpexcept_ignore(double %x, double %y) #0 {
3138; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3239; GFX10-NEXT: v_add_f64 v[0:1], v[0:1], v[2:3]
3340; GFX10-NEXT: s_setpc_b64 s[30:31]
41+ ;
42+ ; GFX11-LABEL: v_constained_fadd_f64_fpexcept_ignore:
43+ ; GFX11: ; %bb.0:
44+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
45+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[2:3]
46+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
3447 %val = call double @llvm.experimental.constrained.fadd.f64 (double %x , double %y , metadata !"round.tonearest" , metadata !"fpexcept.ignore" )
3548 ret double %val
3649}
@@ -47,6 +60,12 @@ define double @v_constained_fadd_f64_fpexcept_maytrap(double %x, double %y) #0 {
4760; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
4861; GFX10-NEXT: v_add_f64 v[0:1], v[0:1], v[2:3]
4962; GFX10-NEXT: s_setpc_b64 s[30:31]
63+ ;
64+ ; GFX11-LABEL: v_constained_fadd_f64_fpexcept_maytrap:
65+ ; GFX11: ; %bb.0:
66+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
67+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[2:3]
68+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
5069 %val = call double @llvm.experimental.constrained.fadd.f64 (double %x , double %y , metadata !"round.tonearest" , metadata !"fpexcept.maytrap" )
5170 ret double %val
5271}
@@ -65,6 +84,13 @@ define <2 x double> @v_constained_fadd_v2f64_fpexcept_strict(<2 x double> %x, <2
6584; GFX10-NEXT: v_add_f64 v[0:1], v[0:1], v[4:5]
6685; GFX10-NEXT: v_add_f64 v[2:3], v[2:3], v[6:7]
6786; GFX10-NEXT: s_setpc_b64 s[30:31]
87+ ;
88+ ; GFX11-LABEL: v_constained_fadd_v2f64_fpexcept_strict:
89+ ; GFX11: ; %bb.0:
90+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
91+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[4:5]
92+ ; GFX11-NEXT: v_add_f64 v[2:3], v[2:3], v[6:7]
93+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
6894 %val = call <2 x double > @llvm.experimental.constrained.fadd.v2f64 (<2 x double > %x , <2 x double > %y , metadata !"round.tonearest" , metadata !"fpexcept.strict" )
6995 ret <2 x double > %val
7096}
@@ -83,6 +109,13 @@ define <2 x double> @v_constained_fadd_v2f64_fpexcept_ignore(<2 x double> %x, <2
83109; GFX10-NEXT: v_add_f64 v[0:1], v[0:1], v[4:5]
84110; GFX10-NEXT: v_add_f64 v[2:3], v[2:3], v[6:7]
85111; GFX10-NEXT: s_setpc_b64 s[30:31]
112+ ;
113+ ; GFX11-LABEL: v_constained_fadd_v2f64_fpexcept_ignore:
114+ ; GFX11: ; %bb.0:
115+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
116+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[4:5]
117+ ; GFX11-NEXT: v_add_f64 v[2:3], v[2:3], v[6:7]
118+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
86119 %val = call <2 x double > @llvm.experimental.constrained.fadd.v2f64 (<2 x double > %x , <2 x double > %y , metadata !"round.tonearest" , metadata !"fpexcept.ignore" )
87120 ret <2 x double > %val
88121}
@@ -101,6 +134,13 @@ define <2 x double> @v_constained_fadd_v2f64_fpexcept_maytrap(<2 x double> %x, <
101134; GFX10-NEXT: v_add_f64 v[0:1], v[0:1], v[4:5]
102135; GFX10-NEXT: v_add_f64 v[2:3], v[2:3], v[6:7]
103136; GFX10-NEXT: s_setpc_b64 s[30:31]
137+ ;
138+ ; GFX11-LABEL: v_constained_fadd_v2f64_fpexcept_maytrap:
139+ ; GFX11: ; %bb.0:
140+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
141+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[4:5]
142+ ; GFX11-NEXT: v_add_f64 v[2:3], v[2:3], v[6:7]
143+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
104144 %val = call <2 x double > @llvm.experimental.constrained.fadd.v2f64 (<2 x double > %x , <2 x double > %y , metadata !"round.tonearest" , metadata !"fpexcept.maytrap" )
105145 ret <2 x double > %val
106146}
@@ -121,6 +161,14 @@ define <3 x double> @v_constained_fadd_v3f64_fpexcept_strict(<3 x double> %x, <3
121161; GFX10-NEXT: v_add_f64 v[2:3], v[2:3], v[8:9]
122162; GFX10-NEXT: v_add_f64 v[4:5], v[4:5], v[10:11]
123163; GFX10-NEXT: s_setpc_b64 s[30:31]
164+ ;
165+ ; GFX11-LABEL: v_constained_fadd_v3f64_fpexcept_strict:
166+ ; GFX11: ; %bb.0:
167+ ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
168+ ; GFX11-NEXT: v_add_f64 v[0:1], v[0:1], v[6:7]
169+ ; GFX11-NEXT: v_add_f64 v[2:3], v[2:3], v[8:9]
170+ ; GFX11-NEXT: v_add_f64 v[4:5], v[4:5], v[10:11]
171+ ; GFX11-NEXT: s_setpc_b64 s[30:31]
124172 %val = call <3 x double > @llvm.experimental.constrained.fadd.v3f64 (<3 x double > %x , <3 x double > %y , metadata !"round.tonearest" , metadata !"fpexcept.strict" )
125173 ret <3 x double > %val
126174}
@@ -133,10 +181,24 @@ define amdgpu_ps <2 x float> @s_constained_fadd_f64_fpexcept_strict(double inreg
133181; GCN-NEXT: v_add_f64 v[0:1], s[2:3], v[0:1]
134182; GCN-NEXT: ; return to shader part epilog
135183;
136- ; GFX10-LABEL: s_constained_fadd_f64_fpexcept_strict:
137- ; GFX10: ; %bb.0:
138- ; GFX10-NEXT: v_add_f64 v[0:1], s[2:3], s[4:5]
139- ; GFX10-NEXT: ; return to shader part epilog
184+ ; SDAG-LABEL: s_constained_fadd_f64_fpexcept_strict:
185+ ; SDAG: ; %bb.0:
186+ ; SDAG-NEXT: v_add_f64 v[0:1], s[2:3], s[4:5]
187+ ; SDAG-NEXT: ; return to shader part epilog
188+ ;
189+ ; GISEL-LABEL: s_constained_fadd_f64_fpexcept_strict:
190+ ; GISEL: ; %bb.0:
191+ ; GISEL-NEXT: v_add_f64 v[0:1], s[2:3], s[4:5]
192+ ; GISEL-NEXT: v_readfirstlane_b32 s0, v0
193+ ; GISEL-NEXT: v_readfirstlane_b32 s1, v1
194+ ; GISEL-NEXT: v_mov_b32_e32 v0, s0
195+ ; GISEL-NEXT: v_mov_b32_e32 v1, s1
196+ ; GISEL-NEXT: ; return to shader part epilog
197+ ;
198+ ; GFX11-LABEL: s_constained_fadd_f64_fpexcept_strict:
199+ ; GFX11: ; %bb.0:
200+ ; GFX11-NEXT: v_add_f64 v[0:1], s[2:3], s[4:5]
201+ ; GFX11-NEXT: ; return to shader part epilog
140202 %val = call double @llvm.experimental.constrained.fadd.f64 (double %x , double %y , metadata !"round.tonearest" , metadata !"fpexcept.strict" )
141203 %cast = bitcast double %val to <2 x float >
142204 ret <2 x float > %cast
0 commit comments