Skip to content

Commit 75c5d97

Browse files
committed
Use erff instead of atan2 for builtin calling convention check
1 parent a677612 commit 75c5d97

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %clang_cc1 -triple x86_64-linux-pc -DREDECL -emit-llvm -fmath-errno %s -o - | FileCheck %s -check-prefix LINUX
2-
// RUN: %clang_cc1 -triple spir-unknown-unknown -DREDECL -DSPIR -emit-llvm -fmath-errno %s -o - | FileCheck %s -check-prefix SPIR
3-
// RUN: %clang_cc1 -triple x86_64-linux-pc -emit-llvm -fmath-errno %s -o - | FileCheck %s -check-prefix LINUX
4-
// RUN: %clang_cc1 -triple spir-unknown-unknown -DSPIR -emit-llvm -fmath-errno %s -o - | FileCheck %s -check-prefix SPIR
5-
// RUN: %clang_cc1 -triple i386-windows-pc -fdefault-calling-conv=stdcall -emit-llvm -fmath-errno %s -o - | FileCheck %s -check-prefix WIN32
1+
// RUN: %clang_cc1 -triple x86_64-linux-pc -DREDECL -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX
2+
// RUN: %clang_cc1 -triple spir-unknown-unknown -DREDECL -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR
3+
// RUN: %clang_cc1 -triple x86_64-linux-pc -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX
4+
// RUN: %clang_cc1 -triple spir-unknown-unknown -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR
5+
// RUN: %clang_cc1 -triple i386-windows-pc -fdefault-calling-conv=stdcall -emit-llvm %s -o - | FileCheck %s -check-prefix WIN32
66

77
#ifdef REDECL
88
namespace std {
@@ -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"()

0 commit comments

Comments
 (0)