1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefixes=GCN,GFX6,GFX6-SDAG %s
3 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=tonga < %s | FileCheck -check-prefixes=GCN,GFX8,GFX8-SDAG %s
4 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GCN,GFX9,GFX9-SDAG %s
5 ; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GCN,GFX11,GFX11-SDAG %s
7 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefixes=GCN,GFX6,GFX6-GISEL %s
8 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=tonga < %s | FileCheck -check-prefixes=GCN,GFX8,GFX8-GISEL %s
9 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GCN,GFX9,GFX9-GISEL %s
10 ; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GCN,GFX11,GFX11-GISEL %s
12 ; define double @test_ldexp_f64_i16(ptr addrspace(1) %out, double %a, i16 %b) #0 {
13 ; %result = call double @llvm.experimental.constrained.ldexp.f64.i16(double %a, i16 %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
17 define double @test_ldexp_f64_i32(ptr addrspace(1) %out, double %a, i32 %b) #0 {
18 ; GCN-LABEL: test_ldexp_f64_i32:
20 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
21 ; GCN-NEXT: v_ldexp_f64 v[0:1], v[2:3], v4
22 ; GCN-NEXT: s_setpc_b64 s[30:31]
23 %result = call double @llvm.experimental.constrained.ldexp.f64.i32(double %a, i32 %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
27 ; define <2 x double> @test_ldexp_v2f64_v2i16(ptr addrspace(1) %out, <2 x double> %a, <2 x i16> %b) #0 {
28 ; %result = call <2 x double> @llvm.experimental.constrained.ldexp.v2f64.v2i16(<2 x double> %a, <2 x i16> %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
29 ; ret <2 x double> %result
32 define <2 x double> @test_ldexp_v2f64_v2i32(ptr addrspace(1) %out, <2 x double> %a, <2 x i32> %b) #0 {
33 ; GCN-LABEL: test_ldexp_v2f64_v2i32:
35 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
36 ; GCN-NEXT: v_ldexp_f64 v[0:1], v[2:3], v6
37 ; GCN-NEXT: v_ldexp_f64 v[2:3], v[4:5], v7
38 ; GCN-NEXT: s_setpc_b64 s[30:31]
39 %result = call <2 x double> @llvm.experimental.constrained.ldexp.v2f64.v2i32(<2 x double> %a, <2 x i32> %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
40 ret <2 x double> %result
43 define <3 x double> @test_ldexp_v3f64_v3i32(ptr addrspace(1) %out, <3 x double> %a, <3 x i32> %b) #0 {
44 ; GCN-LABEL: test_ldexp_v3f64_v3i32:
46 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
47 ; GCN-NEXT: v_ldexp_f64 v[0:1], v[2:3], v8
48 ; GCN-NEXT: v_ldexp_f64 v[2:3], v[4:5], v9
49 ; GCN-NEXT: v_ldexp_f64 v[4:5], v[6:7], v10
50 ; GCN-NEXT: s_setpc_b64 s[30:31]
51 %result = call <3 x double> @llvm.experimental.constrained.ldexp.v3f64.v3i32(<3 x double> %a, <3 x i32> %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
52 ret <3 x double> %result
55 define <4 x double> @test_ldexp_v4f64_v4i32(ptr addrspace(1) %out, <4 x double> %a, <4 x i32> %b) #0 {
56 ; GCN-LABEL: test_ldexp_v4f64_v4i32:
58 ; GCN-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
59 ; GCN-NEXT: v_ldexp_f64 v[0:1], v[2:3], v10
60 ; GCN-NEXT: v_ldexp_f64 v[2:3], v[4:5], v11
61 ; GCN-NEXT: v_ldexp_f64 v[4:5], v[6:7], v12
62 ; GCN-NEXT: v_ldexp_f64 v[6:7], v[8:9], v13
63 ; GCN-NEXT: s_setpc_b64 s[30:31]
64 %result = call <4 x double> @llvm.experimental.constrained.ldexp.v4f64.v4i32(<4 x double> %a, <4 x i32> %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
65 ret <4 x double> %result
68 declare double @llvm.experimental.constrained.ldexp.f64.i16(double, i16, metadata, metadata) #1
69 declare double @llvm.experimental.constrained.ldexp.f64.i32(double, i32, metadata, metadata) #1
70 declare <2 x double> @llvm.experimental.constrained.ldexp.v2f64.v2i16(<2 x double>, <2 x i16>, metadata, metadata) #1
71 declare <2 x double> @llvm.experimental.constrained.ldexp.v2f64.v2i32(<2 x double>, <2 x i32>, metadata, metadata) #1
72 declare <3 x double> @llvm.experimental.constrained.ldexp.v3f64.v3i32(<3 x double>, <3 x i32>, metadata, metadata) #1
73 declare <4 x double> @llvm.experimental.constrained.ldexp.v4f64.v4i32(<4 x double>, <4 x i32>, metadata, metadata) #1
75 attributes #0 = { strictfp }
76 attributes #1 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
77 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: