1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -global-isel=0 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefix=GCN %s
3 ; RUN: llc -global-isel=1 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefix=GCN %s
4 ; RUN: llc -global-isel=0 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX10 %s
5 ; RUN: llc -global-isel=1 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 < %s | FileCheck -check-prefix=GFX10 %s
6 ; RUN: llc -global-isel=0 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 < %s | FileCheck -check-prefix=GFX10 %s
7 ; RUN: llc -global-isel=1 -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 < %s | FileCheck -check-prefix=GFX10 %s
9 define double @v_constained_fmul_f64_fpexcept_strict(double %x, double %y) #0 {
10 ; GCN-LABEL: v_constained_fmul_f64_fpexcept_strict:
12 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
13 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[2:3]
14 ; GCN-NEXT: s_setpc_b64 s[30:31]
16 ; GFX10-LABEL: v_constained_fmul_f64_fpexcept_strict:
18 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
19 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[2:3]
20 ; GFX10-NEXT: s_setpc_b64 s[30:31]
21 %val = call double @llvm.experimental.constrained.fmul.f64(double %x, double %y, metadata !"round.tonearest", metadata !"fpexcept.strict")
25 define double @v_constained_fmul_f64_fpexcept_ignore(double %x, double %y) #0 {
26 ; GCN-LABEL: v_constained_fmul_f64_fpexcept_ignore:
28 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
29 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[2:3]
30 ; GCN-NEXT: s_setpc_b64 s[30:31]
32 ; GFX10-LABEL: v_constained_fmul_f64_fpexcept_ignore:
34 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
35 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[2:3]
36 ; GFX10-NEXT: s_setpc_b64 s[30:31]
37 %val = call double @llvm.experimental.constrained.fmul.f64(double %x, double %y, metadata !"round.tonearest", metadata !"fpexcept.ignore")
41 define double @v_constained_fmul_f64_fpexcept_maytrap(double %x, double %y) #0 {
42 ; GCN-LABEL: v_constained_fmul_f64_fpexcept_maytrap:
44 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
45 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[2:3]
46 ; GCN-NEXT: s_setpc_b64 s[30:31]
48 ; GFX10-LABEL: v_constained_fmul_f64_fpexcept_maytrap:
50 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
51 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[2:3]
52 ; GFX10-NEXT: s_setpc_b64 s[30:31]
53 %val = call double @llvm.experimental.constrained.fmul.f64(double %x, double %y, metadata !"round.tonearest", metadata !"fpexcept.maytrap")
57 define <2 x double> @v_constained_fmul_v2f64_fpexcept_strict(<2 x double> %x, <2 x double> %y) #0 {
58 ; GCN-LABEL: v_constained_fmul_v2f64_fpexcept_strict:
60 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
61 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[4:5]
62 ; GCN-NEXT: v_mul_f64 v[2:3], v[2:3], v[6:7]
63 ; GCN-NEXT: s_setpc_b64 s[30:31]
65 ; GFX10-LABEL: v_constained_fmul_v2f64_fpexcept_strict:
67 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
68 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[4:5]
69 ; GFX10-NEXT: v_mul_f64 v[2:3], v[2:3], v[6:7]
70 ; GFX10-NEXT: s_setpc_b64 s[30:31]
71 %val = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double> %x, <2 x double> %y, metadata !"round.tonearest", metadata !"fpexcept.strict")
75 define <2 x double> @v_constained_fmul_v2f64_fpexcept_ignore(<2 x double> %x, <2 x double> %y) #0 {
76 ; GCN-LABEL: v_constained_fmul_v2f64_fpexcept_ignore:
78 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
79 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[4:5]
80 ; GCN-NEXT: v_mul_f64 v[2:3], v[2:3], v[6:7]
81 ; GCN-NEXT: s_setpc_b64 s[30:31]
83 ; GFX10-LABEL: v_constained_fmul_v2f64_fpexcept_ignore:
85 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
86 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[4:5]
87 ; GFX10-NEXT: v_mul_f64 v[2:3], v[2:3], v[6:7]
88 ; GFX10-NEXT: s_setpc_b64 s[30:31]
89 %val = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double> %x, <2 x double> %y, metadata !"round.tonearest", metadata !"fpexcept.ignore")
93 define <2 x double> @v_constained_fmul_v2f64_fpexcept_maytrap(<2 x double> %x, <2 x double> %y) #0 {
94 ; GCN-LABEL: v_constained_fmul_v2f64_fpexcept_maytrap:
96 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
97 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[4:5]
98 ; GCN-NEXT: v_mul_f64 v[2:3], v[2:3], v[6:7]
99 ; GCN-NEXT: s_setpc_b64 s[30:31]
101 ; GFX10-LABEL: v_constained_fmul_v2f64_fpexcept_maytrap:
103 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
104 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[4:5]
105 ; GFX10-NEXT: v_mul_f64 v[2:3], v[2:3], v[6:7]
106 ; GFX10-NEXT: s_setpc_b64 s[30:31]
107 %val = call <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double> %x, <2 x double> %y, metadata !"round.tonearest", metadata !"fpexcept.maytrap")
108 ret <2 x double> %val
111 define <3 x double> @v_constained_fmul_v3f64_fpexcept_strict(<3 x double> %x, <3 x double> %y) #0 {
112 ; GCN-LABEL: v_constained_fmul_v3f64_fpexcept_strict:
114 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
115 ; GCN-NEXT: v_mul_f64 v[0:1], v[0:1], v[6:7]
116 ; GCN-NEXT: v_mul_f64 v[2:3], v[2:3], v[8:9]
117 ; GCN-NEXT: v_mul_f64 v[4:5], v[4:5], v[10:11]
118 ; GCN-NEXT: s_setpc_b64 s[30:31]
120 ; GFX10-LABEL: v_constained_fmul_v3f64_fpexcept_strict:
122 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
123 ; GFX10-NEXT: v_mul_f64 v[0:1], v[0:1], v[6:7]
124 ; GFX10-NEXT: v_mul_f64 v[2:3], v[2:3], v[8:9]
125 ; GFX10-NEXT: v_mul_f64 v[4:5], v[4:5], v[10:11]
126 ; GFX10-NEXT: s_setpc_b64 s[30:31]
127 %val = call <3 x double> @llvm.experimental.constrained.fmul.v3f64(<3 x double> %x, <3 x double> %y, metadata !"round.tonearest", metadata !"fpexcept.strict")
128 ret <3 x double> %val
131 define amdgpu_ps <2 x float> @s_constained_fmul_f64_fpexcept_strict(double inreg %x, double inreg %y) #0 {
132 ; GCN-LABEL: s_constained_fmul_f64_fpexcept_strict:
134 ; GCN-NEXT: v_mov_b32_e32 v0, s4
135 ; GCN-NEXT: v_mov_b32_e32 v1, s5
136 ; GCN-NEXT: v_mul_f64 v[0:1], s[2:3], v[0:1]
137 ; GCN-NEXT: ; return to shader part epilog
139 ; GFX10-LABEL: s_constained_fmul_f64_fpexcept_strict:
141 ; GFX10-NEXT: v_mul_f64 v[0:1], s[2:3], s[4:5]
142 ; GFX10-NEXT: ; return to shader part epilog
143 %val = call double @llvm.experimental.constrained.fmul.f64(double %x, double %y, metadata !"round.tonearest", metadata !"fpexcept.strict")
144 %cast = bitcast double %val to <2 x float>
145 ret <2 x float> %cast
148 declare double @llvm.experimental.constrained.fmul.f64(double, double, metadata, metadata) #1
149 declare <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double>, <2 x double>, metadata, metadata) #1
150 declare <3 x double> @llvm.experimental.constrained.fmul.v3f64(<3 x double>, <3 x double>, metadata, metadata) #1
152 attributes #0 = { strictfp }
153 attributes #1 = { inaccessiblememonly nounwind willreturn }