xref: /llvm-project/llvm/test/Transforms/Attributor/nofpclass-arithmetic-fence.ll (revision d48d108bc66adb31185ee023e1eb0ccdda2065c1)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
3
4declare float @llvm.arithmetic.fence.f32(float)
5
6define float @ret_arithmetic.fence(float %arg0) {
7; CHECK-LABEL: define float @ret_arithmetic.fence
8; CHECK-SAME: (float [[ARG0:%.*]]) #[[ATTR1:[0-9]+]] {
9; CHECK-NEXT:    [[CALL:%.*]] = call float @llvm.arithmetic.fence.f32(float [[ARG0]]) #[[ATTR2:[0-9]+]]
10; CHECK-NEXT:    ret float [[CALL]]
11;
12  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
13  ret float %call
14}
15
16define float @ret_arithmetic.fence_noinf(float nofpclass(inf) %arg0) {
17; CHECK-LABEL: define nofpclass(inf) float @ret_arithmetic.fence_noinf
18; CHECK-SAME: (float nofpclass(inf) [[ARG0:%.*]]) #[[ATTR1]] {
19; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(inf) float @llvm.arithmetic.fence.f32(float nofpclass(inf) [[ARG0]]) #[[ATTR2]]
20; CHECK-NEXT:    ret float [[CALL]]
21;
22  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
23  ret float %call
24}
25
26define float @ret_arithmetic.fence_nopinf(float nofpclass(pinf) %arg0) {
27; CHECK-LABEL: define nofpclass(pinf) float @ret_arithmetic.fence_nopinf
28; CHECK-SAME: (float nofpclass(pinf) [[ARG0:%.*]]) #[[ATTR1]] {
29; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(pinf) float @llvm.arithmetic.fence.f32(float nofpclass(pinf) [[ARG0]]) #[[ATTR2]]
30; CHECK-NEXT:    ret float [[CALL]]
31;
32  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
33  ret float %call
34}
35
36define float @ret_arithmetic.fence_noninf(float nofpclass(ninf) %arg0) {
37; CHECK-LABEL: define nofpclass(ninf) float @ret_arithmetic.fence_noninf
38; CHECK-SAME: (float nofpclass(ninf) [[ARG0:%.*]]) #[[ATTR1]] {
39; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(ninf) float @llvm.arithmetic.fence.f32(float nofpclass(ninf) [[ARG0]]) #[[ATTR2]]
40; CHECK-NEXT:    ret float [[CALL]]
41;
42  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
43  ret float %call
44}
45
46define float @ret_arithmetic.fence_nonan(float nofpclass(nan) %arg0) {
47; CHECK-LABEL: define nofpclass(nan) float @ret_arithmetic.fence_nonan
48; CHECK-SAME: (float nofpclass(nan) [[ARG0:%.*]]) #[[ATTR1]] {
49; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nan) float @llvm.arithmetic.fence.f32(float nofpclass(nan) [[ARG0]]) #[[ATTR2]]
50; CHECK-NEXT:    ret float [[CALL]]
51;
52  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
53  ret float %call
54}
55
56define float @ret_arithmetic.fence_noqnan(float nofpclass(qnan) %arg0) {
57; CHECK-LABEL: define nofpclass(qnan) float @ret_arithmetic.fence_noqnan
58; CHECK-SAME: (float nofpclass(qnan) [[ARG0:%.*]]) #[[ATTR1]] {
59; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(qnan) float @llvm.arithmetic.fence.f32(float nofpclass(qnan) [[ARG0]]) #[[ATTR2]]
60; CHECK-NEXT:    ret float [[CALL]]
61;
62  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
63  ret float %call
64}
65
66define float @ret_arithmetic.fence_nosnan(float nofpclass(snan) %arg0) {
67; CHECK-LABEL: define nofpclass(snan) float @ret_arithmetic.fence_nosnan
68; CHECK-SAME: (float nofpclass(snan) [[ARG0:%.*]]) #[[ATTR1]] {
69; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(snan) float @llvm.arithmetic.fence.f32(float nofpclass(snan) [[ARG0]]) #[[ATTR2]]
70; CHECK-NEXT:    ret float [[CALL]]
71;
72  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
73  ret float %call
74}
75
76define float @ret_arithmetic.fence_nozero(float nofpclass(zero) %arg0) {
77; CHECK-LABEL: define nofpclass(zero) float @ret_arithmetic.fence_nozero
78; CHECK-SAME: (float nofpclass(zero) [[ARG0:%.*]]) #[[ATTR1]] {
79; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(zero) float @llvm.arithmetic.fence.f32(float nofpclass(zero) [[ARG0]]) #[[ATTR2]]
80; CHECK-NEXT:    ret float [[CALL]]
81;
82  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
83  ret float %call
84}
85
86define float @ret_arithmetic.fence_nopzero(float nofpclass(pzero) %arg0) {
87; CHECK-LABEL: define nofpclass(pzero) float @ret_arithmetic.fence_nopzero
88; CHECK-SAME: (float nofpclass(pzero) [[ARG0:%.*]]) #[[ATTR1]] {
89; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(pzero) float @llvm.arithmetic.fence.f32(float nofpclass(pzero) [[ARG0]]) #[[ATTR2]]
90; CHECK-NEXT:    ret float [[CALL]]
91;
92  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
93  ret float %call
94}
95
96define float @ret_arithmetic.fence_nonzero(float nofpclass(nzero) %arg0) {
97; CHECK-LABEL: define nofpclass(nzero) float @ret_arithmetic.fence_nonzero
98; CHECK-SAME: (float nofpclass(nzero) [[ARG0:%.*]]) #[[ATTR1]] {
99; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(nzero) float @llvm.arithmetic.fence.f32(float nofpclass(nzero) [[ARG0]]) #[[ATTR2]]
100; CHECK-NEXT:    ret float [[CALL]]
101;
102  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
103  ret float %call
104}
105
106define float @ret_arithmetic.fence_nonorm(float nofpclass(norm) %arg0) {
107; CHECK-LABEL: define nofpclass(norm) float @ret_arithmetic.fence_nonorm
108; CHECK-SAME: (float nofpclass(norm) [[ARG0:%.*]]) #[[ATTR1]] {
109; CHECK-NEXT:    [[CALL:%.*]] = call nofpclass(norm) float @llvm.arithmetic.fence.f32(float nofpclass(norm) [[ARG0]]) #[[ATTR2]]
110; CHECK-NEXT:    ret float [[CALL]]
111;
112  %call = call float @llvm.arithmetic.fence.f32(float %arg0)
113  ret float %call
114}
115;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
116; TUNIT: {{.*}}
117