Skip to content

Commit e9743e2

Browse files
authored
[clang] Support constrained fp elementwise builtins (#166905)
Currently only __builtin_elementwise_sqrt emits contrained fp intrinsic and propagates fp options. This commit adds this support for the rest of elementwise builtins.
1 parent c7a9be8 commit e9743e2

File tree

10 files changed

+321
-402
lines changed

10 files changed

+321
-402
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 35 additions & 86 deletions
Large diffs are not rendered by default.

clang/test/CodeGen/strictfp-elementwise-builtins.cpp

Lines changed: 72 additions & 102 deletions
Large diffs are not rendered by default.

clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@
33
// RUN: FileCheck %s --check-prefixes=CHECK
44

55
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_double
6-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
7-
// CHECK: ret float %elt.exp
6+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
7+
// CHECK: ret float [[EXP]]
88
float test_exp_double(double p0) { return exp(p0); }
99
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_double2
10-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
11-
// CHECK: ret <2 x float> %elt.exp
10+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
11+
// CHECK: ret <2 x float> [[EXP]]
1212
float2 test_exp_double2(double2 p0) { return exp(p0); }
1313
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_double3
14-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
15-
// CHECK: ret <3 x float> %elt.exp
14+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
15+
// CHECK: ret <3 x float> [[EXP]]
1616
float3 test_exp_double3(double3 p0) { return exp(p0); }
1717
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_double4
18-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
19-
// CHECK: ret <4 x float> %elt.exp
18+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
19+
// CHECK: ret <4 x float> [[EXP]]
2020
float4 test_exp_double4(double4 p0) { return exp(p0); }
2121

2222
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_int
23-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
24-
// CHECK: ret float %elt.exp
23+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
24+
// CHECK: ret float [[EXP]]
2525
float test_exp_int(int p0) { return exp(p0); }
2626
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_int2
27-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
28-
// CHECK: ret <2 x float> %elt.exp
27+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
28+
// CHECK: ret <2 x float> [[EXP]]
2929
float2 test_exp_int2(int2 p0) { return exp(p0); }
3030
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_int3
31-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
32-
// CHECK: ret <3 x float> %elt.exp
31+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
32+
// CHECK: ret <3 x float> [[EXP]]
3333
float3 test_exp_int3(int3 p0) { return exp(p0); }
3434
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_int4
35-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
36-
// CHECK: ret <4 x float> %elt.exp
35+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
36+
// CHECK: ret <4 x float> [[EXP]]
3737
float4 test_exp_int4(int4 p0) { return exp(p0); }
3838

3939
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_uint
40-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
41-
// CHECK: ret float %elt.exp
40+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
41+
// CHECK: ret float [[EXP]]
4242
float test_exp_uint(uint p0) { return exp(p0); }
4343
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_uint2
44-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
45-
// CHECK: ret <2 x float> %elt.exp
44+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
45+
// CHECK: ret <2 x float> [[EXP]]
4646
float2 test_exp_uint2(uint2 p0) { return exp(p0); }
4747
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_uint3
48-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
49-
// CHECK: ret <3 x float> %elt.exp
48+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
49+
// CHECK: ret <3 x float> [[EXP]]
5050
float3 test_exp_uint3(uint3 p0) { return exp(p0); }
5151
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_uint4
52-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
53-
// CHECK: ret <4 x float> %elt.exp
52+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
53+
// CHECK: ret <4 x float> [[EXP]]
5454
float4 test_exp_uint4(uint4 p0) { return exp(p0); }
5555

5656
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_int64_t
57-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
58-
// CHECK: ret float %elt.exp
57+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
58+
// CHECK: ret float [[EXP]]
5959
float test_exp_int64_t(int64_t p0) { return exp(p0); }
6060
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_int64_t2
61-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
62-
// CHECK: ret <2 x float> %elt.exp
61+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
62+
// CHECK: ret <2 x float> [[EXP]]
6363
float2 test_exp_int64_t2(int64_t2 p0) { return exp(p0); }
6464
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_int64_t3
65-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
66-
// CHECK: ret <3 x float> %elt.exp
65+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
66+
// CHECK: ret <3 x float> [[EXP]]
6767
float3 test_exp_int64_t3(int64_t3 p0) { return exp(p0); }
6868
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_int64_t4
69-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
70-
// CHECK: ret <4 x float> %elt.exp
69+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
70+
// CHECK: ret <4 x float> [[EXP]]
7171
float4 test_exp_int64_t4(int64_t4 p0) { return exp(p0); }
7272

7373
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp_uint64_t
74-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
75-
// CHECK: ret float %elt.exp
74+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
75+
// CHECK: ret float [[EXP]]
7676
float test_exp_uint64_t(uint64_t p0) { return exp(p0); }
7777
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp_uint64_t2
78-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
79-
// CHECK: ret <2 x float> %elt.exp
78+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
79+
// CHECK: ret <2 x float> [[EXP]]
8080
float2 test_exp_uint64_t2(uint64_t2 p0) { return exp(p0); }
8181
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp_uint64_t3
82-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
83-
// CHECK: ret <3 x float> %elt.exp
82+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
83+
// CHECK: ret <3 x float> [[EXP]]
8484
float3 test_exp_uint64_t3(uint64_t3 p0) { return exp(p0); }
8585
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp_uint64_t4
86-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
87-
// CHECK: ret <4 x float> %elt.exp
86+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
87+
// CHECK: ret <4 x float> [[EXP]]
8888
float4 test_exp_uint64_t4(uint64_t4 p0) { return exp(p0); }

clang/test/CodeGenHLSL/builtins/exp.hlsl

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,47 @@
66
// RUN: FileCheck %s --check-prefixes=CHECK,NO_HALF
77

88
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) half @_Z13test_exp_half
9-
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn half @llvm.exp.f16(
10-
// NATIVE_HALF: ret half %elt.exp
9+
// NATIVE_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn half @llvm.exp.f16(
10+
// NATIVE_HALF: ret half [[EXP]]
1111
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) float @_Z13test_exp_half
12-
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
13-
// NO_HALF: ret float %elt.exp
12+
// NO_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
13+
// NO_HALF: ret float [[EXP]]
1414
half test_exp_half(half p0) { return exp(p0); }
1515
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x half> @_Z14test_exp_half2
16-
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.exp.v2f16
17-
// NATIVE_HALF: ret <2 x half> %elt.exp
16+
// NATIVE_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.exp.v2f16
17+
// NATIVE_HALF: ret <2 x half> [[EXP]]
1818
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z14test_exp_half2
19-
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32(
20-
// NO_HALF: ret <2 x float> %elt.exp
19+
// NO_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32(
20+
// NO_HALF: ret <2 x float> [[EXP]]
2121
half2 test_exp_half2(half2 p0) { return exp(p0); }
2222
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x half> @_Z14test_exp_half3
23-
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.exp.v3f16
24-
// NATIVE_HALF: ret <3 x half> %elt.exp
23+
// NATIVE_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.exp.v3f16
24+
// NATIVE_HALF: ret <3 x half> [[EXP]]
2525
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z14test_exp_half3
26-
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32(
27-
// NO_HALF: ret <3 x float> %elt.exp
26+
// NO_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32(
27+
// NO_HALF: ret <3 x float> [[EXP]]
2828
half3 test_exp_half3(half3 p0) { return exp(p0); }
2929
// NATIVE_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x half> @_Z14test_exp_half4
30-
// NATIVE_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.exp.v4f16
31-
// NATIVE_HALF: ret <4 x half> %elt.exp
30+
// NATIVE_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.exp.v4f16
31+
// NATIVE_HALF: ret <4 x half> [[EXP]]
3232
// NO_HALF-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z14test_exp_half4
33-
// NO_HALF: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32(
34-
// NO_HALF: ret <4 x float> %elt.exp
33+
// NO_HALF: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32(
34+
// NO_HALF: ret <4 x float> [[EXP]]
3535
half4 test_exp_half4(half4 p0) { return exp(p0); }
3636

3737
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float @_Z14test_exp_float
38-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
39-
// CHECK: ret float %elt.exp
38+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp.f32(
39+
// CHECK: ret float [[EXP:%.*]]
4040
float test_exp_float(float p0) { return exp(p0); }
4141
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> @_Z15test_exp_float2
42-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
43-
// CHECK: ret <2 x float> %elt.exp
42+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp.v2f32
43+
// CHECK: ret <2 x float> [[EXP]]
4444
float2 test_exp_float2(float2 p0) { return exp(p0); }
4545
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> @_Z15test_exp_float3
46-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
47-
// CHECK: ret <3 x float> %elt.exp
46+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp.v3f32
47+
// CHECK: ret <3 x float> [[EXP]]
4848
float3 test_exp_float3(float3 p0) { return exp(p0); }
4949
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> @_Z15test_exp_float4
50-
// CHECK: %elt.exp = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
51-
// CHECK: ret <4 x float> %elt.exp
50+
// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp.v4f32
51+
// CHECK: ret <4 x float> [[EXP]]
5252
float4 test_exp_float4(float4 p0) { return exp(p0); }

clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@
33
// RUN: FileCheck %s --check-prefixes=CHECK
44

55
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_double
6-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
7-
// CHECK: ret float %elt.exp2
6+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
7+
// CHECK: ret float [[EXP2]]
88
float test_exp2_double(double p0) { return exp2(p0); }
99
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_double2
10-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
11-
// CHECK: ret <2 x float> %elt.exp2
10+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
11+
// CHECK: ret <2 x float> [[EXP2]]
1212
float2 test_exp2_double2(double2 p0) { return exp2(p0); }
1313
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_double3
14-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
15-
// CHECK: ret <3 x float> %elt.exp2
14+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
15+
// CHECK: ret <3 x float> [[EXP2]]
1616
float3 test_exp2_double3(double3 p0) { return exp2(p0); }
1717
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_double4
18-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
19-
// CHECK: ret <4 x float> %elt.exp2
18+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
19+
// CHECK: ret <4 x float> [[EXP2]]
2020
float4 test_exp2_double4(double4 p0) { return exp2(p0); }
2121

2222
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_int
23-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
24-
// CHECK: ret float %elt.exp2
23+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
24+
// CHECK: ret float [[EXP2]]
2525
float test_exp2_int(int p0) { return exp2(p0); }
2626
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_int2
27-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
28-
// CHECK: ret <2 x float> %elt.exp2
27+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
28+
// CHECK: ret <2 x float> [[EXP2]]
2929
float2 test_exp2_int2(int2 p0) { return exp2(p0); }
3030
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_int3
31-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
32-
// CHECK: ret <3 x float> %elt.exp2
31+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
32+
// CHECK: ret <3 x float> [[EXP2]]
3333
float3 test_exp2_int3(int3 p0) { return exp2(p0); }
3434
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_int4
35-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
36-
// CHECK: ret <4 x float> %elt.exp2
35+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
36+
// CHECK: ret <4 x float> [[EXP2]]
3737
float4 test_exp2_int4(int4 p0) { return exp2(p0); }
3838

3939
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_uint
40-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
41-
// CHECK: ret float %elt.exp2
40+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
41+
// CHECK: ret float [[EXP2]]
4242
float test_exp2_uint(uint p0) { return exp2(p0); }
4343
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_uint2
44-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
45-
// CHECK: ret <2 x float> %elt.exp2
44+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
45+
// CHECK: ret <2 x float> [[EXP2]]
4646
float2 test_exp2_uint2(uint2 p0) { return exp2(p0); }
4747
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_uint3
48-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
49-
// CHECK: ret <3 x float> %elt.exp2
48+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
49+
// CHECK: ret <3 x float> [[EXP2]]
5050
float3 test_exp2_uint3(uint3 p0) { return exp2(p0); }
5151
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_uint4
52-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
53-
// CHECK: ret <4 x float> %elt.exp2
52+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
53+
// CHECK: ret <4 x float> [[EXP2]]
5454
float4 test_exp2_uint4(uint4 p0) { return exp2(p0); }
5555

5656
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_int64_t
57-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
58-
// CHECK: ret float %elt.exp2
57+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
58+
// CHECK: ret float [[EXP2]]
5959
float test_exp2_int64_t(int64_t p0) { return exp2(p0); }
6060
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_int64_t2
61-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
62-
// CHECK: ret <2 x float> %elt.exp2
61+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
62+
// CHECK: ret <2 x float> [[EXP2]]
6363
float2 test_exp2_int64_t2(int64_t2 p0) { return exp2(p0); }
6464
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_int64_t3
65-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
66-
// CHECK: ret <3 x float> %elt.exp2
65+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
66+
// CHECK: ret <3 x float> [[EXP2]]
6767
float3 test_exp2_int64_t3(int64_t3 p0) { return exp2(p0); }
6868
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_int64_t4
69-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
70-
// CHECK: ret <4 x float> %elt.exp2
69+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
70+
// CHECK: ret <4 x float> [[EXP2]]
7171
float4 test_exp2_int64_t4(int64_t4 p0) { return exp2(p0); }
7272

7373
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float {{.*}}test_exp2_uint64_t
74-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
75-
// CHECK: ret float %elt.exp2
74+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn float @llvm.exp2.f32(
75+
// CHECK: ret float [[EXP2]]
7676
float test_exp2_uint64_t(uint64_t p0) { return exp2(p0); }
7777
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> {{.*}}test_exp2_uint64_t2
78-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
79-
// CHECK: ret <2 x float> %elt.exp2
78+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.exp2.v2f32
79+
// CHECK: ret <2 x float> [[EXP2]]
8080
float2 test_exp2_uint64_t2(uint64_t2 p0) { return exp2(p0); }
8181
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> {{.*}}test_exp2_uint64_t3
82-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
83-
// CHECK: ret <3 x float> %elt.exp2
82+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.exp2.v3f32
83+
// CHECK: ret <3 x float> [[EXP2]]
8484
float3 test_exp2_uint64_t3(uint64_t3 p0) { return exp2(p0); }
8585
// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> {{.*}}test_exp2_uint64_t4
86-
// CHECK: %elt.exp2 = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
87-
// CHECK: ret <4 x float> %elt.exp2
86+
// CHECK: [[EXP2:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.exp2.v4f32
87+
// CHECK: ret <4 x float> [[EXP2]]
8888
float4 test_exp2_uint64_t4(uint64_t4 p0) { return exp2(p0); }

0 commit comments

Comments
 (0)