Skip to content

Commit 5c2a133

Browse files
authored
Emit constrained atan2 intrinsic for clang builtin (#113636)
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `Builtins.td` - Add f16 support for libm atan2 builtin - `CGBuiltin.cpp` - Emit constraint atan2 intrinsic for clang builtin - `clang/test/CodeGenCXX/builtin-calling-conv.cpp` - Use erff instead of atan2 for clang builtin to lib call calling convention check, now that atan2 maps to an intrinsic. - add atan2 cases to llvm.experimental.constrained tests for more backends: ARM, PowerPC, RISCV, SystemZ. - LangRef.rst: add llvm.experimental.constrained.atan2, revise llvm.atan2 description. Last part of Implement the atan2 HLSL Function. Fixes #70096.
1 parent f539674 commit 5c2a133

16 files changed

+1145
-38
lines changed

clang/include/clang/Basic/Builtins.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ def FminimumNumF16F128 : Builtin, F16F128MathTemplate {
227227
let Prototype = "T(T, T)";
228228
}
229229

230-
def Atan2F128 : Builtin {
231-
let Spellings = ["__builtin_atan2f128"];
230+
def Atan2F16F128 : Builtin, F16F128MathTemplate {
231+
let Spellings = ["__builtin_atan2"];
232232
let Attributes = [FunctionWithBuiltinPrefix, NoThrow, ConstIgnoringErrnoAndExceptions];
233-
let Prototype = "__float128(__float128, __float128)";
233+
let Prototype = "T(T, T)";
234234
}
235235

236236
def CopysignF16 : Builtin {

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2798,6 +2798,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
27982798
return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(
27992799
*this, E, Intrinsic::atan, Intrinsic::experimental_constrained_atan));
28002800

2801+
case Builtin::BIatan2:
2802+
case Builtin::BIatan2f:
2803+
case Builtin::BIatan2l:
2804+
case Builtin::BI__builtin_atan2:
2805+
case Builtin::BI__builtin_atan2f:
2806+
case Builtin::BI__builtin_atan2f16:
2807+
case Builtin::BI__builtin_atan2l:
2808+
case Builtin::BI__builtin_atan2f128:
2809+
return RValue::get(emitBinaryMaybeConstrainedFPBuiltin(
2810+
*this, E, Intrinsic::atan2,
2811+
Intrinsic::experimental_constrained_atan2));
2812+
28012813
case Builtin::BIceil:
28022814
case Builtin::BIceilf:
28032815
case Builtin::BIceill:

clang/test/CodeGen/X86/math-builtins.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
4545

4646
__builtin_atan2(f,f); __builtin_atan2f(f,f) ; __builtin_atan2l(f, f); __builtin_atan2f128(f,f);
4747

48-
// NO__ERRNO: declare double @atan2(double noundef, double noundef) [[READNONE:#[0-9]+]]
49-
// NO__ERRNO: declare float @atan2f(float noundef, float noundef) [[READNONE]]
50-
// NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
51-
// NO__ERRNO: declare fp128 @atan2f128(fp128 noundef, fp128 noundef) [[READNONE]]
48+
// NO__ERRNO: declare double @llvm.atan2.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
49+
// NO__ERRNO: declare float @llvm.atan2.f32(float, float) [[READNONE_INTRINSIC]]
50+
// NO__ERRNO: declare x86_fp80 @llvm.atan2.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
51+
// NO__ERRNO: declare fp128 @llvm.atan2.f128(fp128, fp128) [[READNONE_INTRINSIC]]
5252
// HAS_ERRNO: declare double @atan2(double noundef, double noundef) [[NOT_READNONE]]
5353
// HAS_ERRNO: declare float @atan2f(float noundef, float noundef) [[NOT_READNONE]]
5454
// HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
5555
// HAS_ERRNO: declare fp128 @atan2f128(fp128 noundef, fp128 noundef) [[NOT_READNONE]]
5656

5757
__builtin_copysign(f,f); __builtin_copysignf(f,f); __builtin_copysignl(f,f); __builtin_copysignf128(f,f);
5858

59-
// NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
59+
// NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC]]
6060
// NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
6161
// NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
6262
// NO__ERRNO: declare fp128 @llvm.copysign.f128(fp128, fp128) [[READNONE_INTRINSIC]]
@@ -179,7 +179,7 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
179179

180180
__builtin_acosh(f); __builtin_acoshf(f); __builtin_acoshl(f); __builtin_acoshf128(f);
181181

182-
// NO__ERRNO: declare double @acosh(double noundef) [[READNONE]]
182+
// NO__ERRNO: declare double @acosh(double noundef) [[READNONE:#[0-9]+]]
183183
// NO__ERRNO: declare float @acoshf(float noundef) [[READNONE]]
184184
// NO__ERRNO: declare x86_fp80 @acoshl(x86_fp80 noundef) [[READNONE]]
185185
// NO__ERRNO: declare fp128 @acoshf128(fp128 noundef) [[READNONE]]
@@ -721,10 +721,10 @@ __builtin_trunc(f); __builtin_truncf(f); __builtin_truncl(f); __builtin
721721
// HAS_ERRNO: declare fp128 @llvm.trunc.f128(fp128) [[READNONE_INTRINSIC]]
722722
};
723723

724-
// NO__ERRNO: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
725724
// NO__ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }
726725
// NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
727726
// NO__ERRNO: attributes [[PURE]] = { {{.*}}memory(read){{.*}} }
727+
// NO__ERRNO: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
728728

729729
// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
730730
// HAS_ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }

clang/test/CodeGen/constrained-math-builtins.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ __builtin_atan(f); __builtin_atanf(f); __builtin_atanl(f); __builti
5757
// CHECK: call x86_fp80 @llvm.experimental.constrained.atan.f80(x86_fp80 %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
5858
// CHECK: call fp128 @llvm.experimental.constrained.atan.f128(fp128 %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
5959

60+
__builtin_atan2(f,f); __builtin_atan2f(f,f); __builtin_atan2l(f,f); __builtin_atan2f128(f,f);
61+
62+
// CHECK: call double @llvm.experimental.constrained.atan2.f64(double %{{.*}}, double %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
63+
// CHECK: call float @llvm.experimental.constrained.atan2.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
64+
// CHECK: call x86_fp80 @llvm.experimental.constrained.atan2.f80(x86_fp80 %{{.*}}, x86_fp80 %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
65+
// CHECK: call fp128 @llvm.experimental.constrained.atan2.f128(fp128 %{{.*}}, fp128 %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
66+
6067
__builtin_ceil(f); __builtin_ceilf(f); __builtin_ceill(f); __builtin_ceilf128(f);
6168

6269
// CHECK: call double @llvm.experimental.constrained.ceil.f64(double %{{.*}}, metadata !"fpexcept.strict")

clang/test/CodeGen/libcalls.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ void test_builtins(double d, float f, long double ld) {
9595
double atan2_ = atan2(d, 2);
9696
long double atan2l_ = atan2l(ld, ld);
9797
float atan2f_ = atan2f(f, f);
98-
// CHECK-NO: declare double @atan2(double noundef, double noundef) [[NUW_RN:#[0-9]+]]
99-
// CHECK-NO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NUW_RN]]
100-
// CHECK-NO: declare float @atan2f(float noundef, float noundef) [[NUW_RN]]
98+
// CHECK-NO: declare double @llvm.atan2.f64(double, double) [[NUW_RNI]]
99+
// CHECK-NO: declare x86_fp80 @llvm.atan2.f80(x86_fp80, x86_fp80) [[NUW_RNI]]
100+
// CHECK-NO: declare float @llvm.atan2.f32(float, float) [[NUW_RNI]]
101101
// CHECK-YES: declare double @atan2(double noundef, double noundef) [[NUW]]
102102
// CHECK-YES: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NUW]]
103103
// CHECK-YES: declare float @atan2f(float noundef, float noundef) [[NUW]]
@@ -124,5 +124,4 @@ void test_builtins(double d, float f, long double ld) {
124124
}
125125

126126
// CHECK-YES: attributes [[NUW]] = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+x87" }
127-
// CHECK-NO-DAG: attributes [[NUW_RN]] = { nounwind willreturn memory(none){{.*}} }
128127
// CHECK-NO-DAG: attributes [[NUW_RNI]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

clang/test/CodeGen/math-libcalls.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
2323

2424
atan2(f,f); atan2f(f,f) ; atan2l(f, f);
2525

26-
// NO__ERRNO: declare double @atan2(double noundef, double noundef) [[READNONE:#[0-9]+]]
27-
// NO__ERRNO: declare float @atan2f(float noundef, float noundef) [[READNONE]]
28-
// NO__ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[READNONE]]
26+
// NO__ERRNO: declare double @llvm.atan2.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
27+
// NO__ERRNO: declare float @llvm.atan2.f32(float, float) [[READNONE_INTRINSIC]]
28+
// NO__ERRNO: declare x86_fp80 @llvm.atan2.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
2929
// HAS_ERRNO: declare double @atan2(double noundef, double noundef) [[NOT_READNONE]]
3030
// HAS_ERRNO: declare float @atan2f(float noundef, float noundef) [[NOT_READNONE]]
3131
// HAS_ERRNO: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
32-
// HAS_MAYTRAP: declare double @atan2(double noundef, double noundef) [[NOT_READNONE:#[0-9]+]]
33-
// HAS_MAYTRAP: declare float @atan2f(float noundef, float noundef) [[NOT_READNONE]]
34-
// HAS_MAYTRAP: declare x86_fp80 @atan2l(x86_fp80 noundef, x86_fp80 noundef) [[NOT_READNONE]]
32+
// HAS_MAYTRAP: declare double @llvm.experimental.constrained.atan2.f64(
33+
// HAS_MAYTRAP: declare float @llvm.experimental.constrained.atan2.f32(
34+
// HAS_MAYTRAP: declare x86_fp80 @llvm.experimental.constrained.atan2.f80(
3535

3636
copysign(f,f); copysignf(f,f);copysignl(f,f);
3737

38-
// NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
38+
// NO__ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC]]
3939
// NO__ERRNO: declare float @llvm.copysign.f32(float, float) [[READNONE_INTRINSIC]]
4040
// NO__ERRNO: declare x86_fp80 @llvm.copysign.f80(x86_fp80, x86_fp80) [[READNONE_INTRINSIC]]
4141
// HAS_ERRNO: declare double @llvm.copysign.f64(double, double) [[READNONE_INTRINSIC:#[0-9]+]]
@@ -65,13 +65,13 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
6565
// HAS_ERRNO: declare double @frexp(double noundef, ptr noundef) [[NOT_READNONE]]
6666
// HAS_ERRNO: declare float @frexpf(float noundef, ptr noundef) [[NOT_READNONE]]
6767
// HAS_ERRNO: declare x86_fp80 @frexpl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
68-
// HAS_MAYTRAP: declare double @frexp(double noundef, ptr noundef) [[NOT_READNONE]]
68+
// HAS_MAYTRAP: declare double @frexp(double noundef, ptr noundef) [[NOT_READNONE:#[0-9]+]]
6969
// HAS_MAYTRAP: declare float @frexpf(float noundef, ptr noundef) [[NOT_READNONE]]
7070
// HAS_MAYTRAP: declare x86_fp80 @frexpl(x86_fp80 noundef, ptr noundef) [[NOT_READNONE]]
7171

7272
ldexp(f,f); ldexpf(f,f); ldexpl(f,f);
7373

74-
// NO__ERRNO: declare double @ldexp(double noundef, i32 noundef) [[READNONE]]
74+
// NO__ERRNO: declare double @ldexp(double noundef, i32 noundef) [[READNONE:#[0-9]+]]
7575
// NO__ERRNO: declare float @ldexpf(float noundef, i32 noundef) [[READNONE]]
7676
// NO__ERRNO: declare x86_fp80 @ldexpl(x86_fp80 noundef, i32 noundef) [[READNONE]]
7777
// HAS_ERRNO: declare double @ldexp(double noundef, i32 noundef) [[NOT_READNONE]]
@@ -719,9 +719,9 @@ void foo(double *d, float f, float *fp, long double *l, int *i, const char *c) {
719719
// HAS_ERRNO: declare x86_fp80 @llvm.trunc.f80(x86_fp80) [[READNONE_INTRINSIC]]
720720
};
721721

722-
// NO__ERRNO: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
723722
// NO__ERRNO: attributes [[READNONE_INTRINSIC]] = { {{.*}}memory(none){{.*}} }
724723
// NO__ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }
724+
// NO__ERRNO: attributes [[READNONE]] = { {{.*}}memory(none){{.*}} }
725725
// NO__ERRNO: attributes [[READONLY]] = { {{.*}}memory(read){{.*}} }
726726

727727
// HAS_ERRNO: attributes [[NOT_READNONE]] = { nounwind {{.*}} }

clang/test/CodeGenCXX/builtin-calling-conv.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ using size_t = unsigned long;
1313
#endif // SPIR
1414
} // namespace std
1515

16-
float __builtin_atan2f(float, float);
16+
float __builtin_erff(float);
1717
void *operator new(std::size_t);
1818
#endif // REDECL
1919

@@ -22,32 +22,32 @@ void foo();
2222
void user() {
2323
int i;
2424
::operator new(5);
25-
(void)__builtin_atan2f(1.1, 2.2);
25+
(void)__builtin_erff(1.1);
2626
foo();
2727
}
2828

2929
// LINUX: define{{.*}} void @_Z4userv()
3030
// LINUX: call noalias noundef nonnull ptr @_Znwm
31-
// LINUX: call float @atan2f
31+
// LINUX: call float @erff
3232
// LINUX: call void @_Z3foov
3333
// LINUX: declare noundef nonnull ptr @_Znwm(i64 noundef)
34-
// LINUX: declare float @atan2f(float noundef, float noundef)
34+
// LINUX: declare float @erff(float noundef)
3535
// LINUX: declare void @_Z3foov()
3636

3737
// SPIR: define{{.*}} spir_func void @_Z4userv()
3838
// SPIR: call spir_func noalias noundef nonnull ptr @_Znwj
39-
// SPIR: call spir_func float @atan2f
39+
// SPIR: call spir_func float @erff
4040
// SPIR: call spir_func void @_Z3foov
4141
// SPIR: declare spir_func noundef nonnull ptr @_Znwj(i32 noundef)
42-
// SPIR: declare spir_func float @atan2f(float noundef, float noundef)
42+
// SPIR: declare spir_func float @erff(float noundef)
4343
// SPIR: declare spir_func void @_Z3foov()
4444

4545
// Note: Windows /G options should not change the platform default calling
4646
// convention of builtins.
4747
// WIN32: define dso_local x86_stdcallcc void @"?user@@YGXXZ"()
4848
// WIN32: call noalias noundef nonnull ptr @"??2@YAPAXI@Z"
49-
// WIN32: call float @atan2f
49+
// WIN32: call float @erff
5050
// WIN32: call x86_stdcallcc void @"?foo@@YGXXZ"
5151
// WIN32: declare dso_local noundef nonnull ptr @"??2@YAPAXI@Z"(
52-
// WIN32: declare dso_local float @atan2f(float noundef, float noundef)
52+
// WIN32: declare dso_local float @erff(float noundef)
5353
// WIN32: declare dso_local x86_stdcallcc void @"?foo@@YGXXZ"()

clang/test/CodeGenOpenCL/builtins-f16.cl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ void test_half_builtins(half h0, half h1, half h2, int i0) {
1515
// CHECK: call half @llvm.atan.f16(half %h0)
1616
res = __builtin_atanf16(h0);
1717

18+
// CHECK: call half @llvm.atan2.f16(half %h0, half %h1)
19+
res = __builtin_atan2f16(h0, h1);
20+
1821
// CHECK: call half @llvm.copysign.f16(half %h0, half %h1)
1922
res = __builtin_copysignf16(h0, h1);
2023

llvm/docs/LangRef.rst

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15749,16 +15749,17 @@ all types however.
1574915749

1575015750
::
1575115751

15752-
declare float @llvm.atan2.f32(float %X, float %Y)
15753-
declare double @llvm.atan2.f64(double %X, double %Y)
15754-
declare x86_fp80 @llvm.atan2.f80(x86_fp80 %X, x86_fp80 %Y)
15755-
declare fp128 @llvm.atan2.f128(fp128 %X, fp128 %Y)
15756-
declare ppc_fp128 @llvm.atan2.ppcf128(ppc_fp128 %X, ppc_fp128 %Y)
15752+
declare float @llvm.atan2.f32(float %Y, float %X)
15753+
declare double @llvm.atan2.f64(double %Y, double %X)
15754+
declare x86_fp80 @llvm.atan2.f80(x86_fp80 %Y, x86_fp80 %X)
15755+
declare fp128 @llvm.atan2.f128(fp128 %Y, fp128 %X)
15756+
declare ppc_fp128 @llvm.atan2.ppcf128(ppc_fp128 %Y, ppc_fp128 %X)
1575715757

1575815758
Overview:
1575915759
"""""""""
1576015760

15761-
The '``llvm.atan2.*``' intrinsics return the arctangent of the operand.
15761+
The '``llvm.atan2.*``' intrinsics return the arctangent of ``Y/X`` accounting
15762+
for the quadrant.
1576215763

1576315764
Arguments:
1576415765
""""""""""
@@ -27260,6 +27261,42 @@ This function returns the arctangent of the specified operand, returning the
2726027261
same values as the libm ``atan`` functions would, and handles error
2726127262
conditions in the same way.
2726227263

27264+
'``llvm.experimental.constrained.atan2``' Intrinsic
27265+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27266+
27267+
Syntax:
27268+
"""""""
27269+
27270+
::
27271+
27272+
declare <type>
27273+
@llvm.experimental.constrained.atan2(<type> <op1>,
27274+
<type> <op2>,
27275+
metadata <rounding mode>,
27276+
metadata <exception behavior>)
27277+
27278+
Overview:
27279+
"""""""""
27280+
27281+
The '``llvm.experimental.constrained.atan2``' intrinsic returns the arctangent
27282+
of ``<op1>`` divided by ``<op2>`` accounting for the quadrant.
27283+
27284+
Arguments:
27285+
""""""""""
27286+
27287+
The first two arguments and the return value are floating-point numbers of the
27288+
same type.
27289+
27290+
The third and fourth arguments specify the rounding mode and exception
27291+
behavior as described above.
27292+
27293+
Semantics:
27294+
""""""""""
27295+
27296+
This function returns the quadrant-specific arctangent using the specified
27297+
operands, returning the same values as the libm ``atan2`` functions would, and
27298+
handles error conditions in the same way.
27299+
2726327300
'``llvm.experimental.constrained.sinh``' Intrinsic
2726427301
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2726527302

llvm/test/CodeGen/ARM/fp-intrinsics.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ define float @tan_f32(float %x) #0 {
146146
ret float %val
147147
}
148148

149+
; CHECK-LABEL: atan2_f32:
150+
; CHECK: bl atan2f
151+
define float @atan2_f32(float %x, float %y) #0 {
152+
%val = call float @llvm.experimental.constrained.atan2.f32(float %x, float %y, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
153+
ret float %val
154+
}
155+
149156
; CHECK-LABEL: pow_f32:
150157
; CHECK: bl powf
151158
define float @pow_f32(float %x, float %y) #0 {
@@ -610,6 +617,13 @@ define double @tan_f64(double %x) #0 {
610617
ret double %val
611618
}
612619

620+
; CHECK-LABEL: atan2_f64:
621+
; CHECK: bl atan2
622+
define double @atan2_f64(double %x, double %y) #0 {
623+
%val = call double @llvm.experimental.constrained.atan2.f64(double %x, double %y, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
624+
ret double %val
625+
}
626+
613627
; CHECK-LABEL: pow_f64:
614628
; CHECK: bl pow
615629
define double @pow_f64(double %x, double %y) #0 {
@@ -1038,6 +1052,7 @@ declare float @llvm.experimental.constrained.powi.f32(float, i32, metadata, meta
10381052
declare float @llvm.experimental.constrained.sin.f32(float, metadata, metadata)
10391053
declare float @llvm.experimental.constrained.cos.f32(float, metadata, metadata)
10401054
declare float @llvm.experimental.constrained.tan.f32(float, metadata, metadata)
1055+
declare float @llvm.experimental.constrained.atan2.f32(float, float, metadata, metadata)
10411056
declare float @llvm.experimental.constrained.pow.f32(float, float, metadata, metadata)
10421057
declare float @llvm.experimental.constrained.log.f32(float, metadata, metadata)
10431058
declare float @llvm.experimental.constrained.log10.f32(float, metadata, metadata)
@@ -1072,6 +1087,7 @@ declare double @llvm.experimental.constrained.powi.f64(double, i32, metadata, me
10721087
declare double @llvm.experimental.constrained.sin.f64(double, metadata, metadata)
10731088
declare double @llvm.experimental.constrained.cos.f64(double, metadata, metadata)
10741089
declare double @llvm.experimental.constrained.tan.f64(double, metadata, metadata)
1090+
declare double @llvm.experimental.constrained.atan2.f64(double, double, metadata, metadata)
10751091
declare double @llvm.experimental.constrained.pow.f64(double, double, metadata, metadata)
10761092
declare double @llvm.experimental.constrained.log.f64(double, metadata, metadata)
10771093
declare double @llvm.experimental.constrained.log10.f64(double, metadata, metadata)

0 commit comments

Comments
 (0)