annotate llvm/test/CodeGen/AMDGPU/llvm.amdgcn.rcp.legacy.ll @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 1d019706d866
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
anatofuz
parents:
diff changeset
2 ; RUN: not llc -march=amdgcn -mcpu=fiji -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=ERROR %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 ; ERROR: error: <unknown>:0:0: in function rcp_legacy_f32 void (float addrspace(1)*, float): intrinsic not supported on subtarget
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 declare float @llvm.amdgcn.rcp.legacy(float) #0
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 ; GCN-LABEL: {{^}}rcp_legacy_f32:
anatofuz
parents:
diff changeset
9 ; GCN: v_rcp_legacy_f32_e32 {{v[0-9]+}}, {{s[0-9]+}}
anatofuz
parents:
diff changeset
10 define amdgpu_kernel void @rcp_legacy_f32(float addrspace(1)* %out, float %src) #1 {
anatofuz
parents:
diff changeset
11 %rcp = call float @llvm.amdgcn.rcp.legacy(float %src) #0
anatofuz
parents:
diff changeset
12 store float %rcp, float addrspace(1)* %out, align 4
anatofuz
parents:
diff changeset
13 ret void
anatofuz
parents:
diff changeset
14 }
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 ; TODO: Really these should be constant folded
anatofuz
parents:
diff changeset
17 ; GCN-LABEL: {{^}}rcp_legacy_f32_constant_4.0
anatofuz
parents:
diff changeset
18 ; GCN: v_rcp_legacy_f32_e32 {{v[0-9]+}}, 4.0
anatofuz
parents:
diff changeset
19 define amdgpu_kernel void @rcp_legacy_f32_constant_4.0(float addrspace(1)* %out) #1 {
anatofuz
parents:
diff changeset
20 %rcp = call float @llvm.amdgcn.rcp.legacy(float 4.0) #0
anatofuz
parents:
diff changeset
21 store float %rcp, float addrspace(1)* %out, align 4
anatofuz
parents:
diff changeset
22 ret void
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 ; GCN-LABEL: {{^}}rcp_legacy_f32_constant_100.0
anatofuz
parents:
diff changeset
26 ; GCN: v_rcp_legacy_f32_e32 {{v[0-9]+}}, 0x42c80000
anatofuz
parents:
diff changeset
27 define amdgpu_kernel void @rcp_legacy_f32_constant_100.0(float addrspace(1)* %out) #1 {
anatofuz
parents:
diff changeset
28 %rcp = call float @llvm.amdgcn.rcp.legacy(float 100.0) #0
anatofuz
parents:
diff changeset
29 store float %rcp, float addrspace(1)* %out, align 4
anatofuz
parents:
diff changeset
30 ret void
anatofuz
parents:
diff changeset
31 }
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 ; GCN-LABEL: {{^}}rcp_legacy_undef_f32:
anatofuz
parents:
diff changeset
34 ; GCN-NOT: v_rcp_legacy_f32
anatofuz
parents:
diff changeset
35 define amdgpu_kernel void @rcp_legacy_undef_f32(float addrspace(1)* %out) #1 {
anatofuz
parents:
diff changeset
36 %rcp = call float @llvm.amdgcn.rcp.legacy(float undef)
anatofuz
parents:
diff changeset
37 store float %rcp, float addrspace(1)* %out, align 4
anatofuz
parents:
diff changeset
38 ret void
anatofuz
parents:
diff changeset
39 }
anatofuz
parents:
diff changeset
40
anatofuz
parents:
diff changeset
41 attributes #0 = { nounwind readnone }
anatofuz
parents:
diff changeset
42 attributes #1 = { nounwind }