Skip to content

Commit d4ff8f8

Browse files
committed
1 parent e94e790 commit d4ff8f8

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

clang/test/CodeGen/math-errno.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
// -O2
22
// RUN: %clang_cc1 -Wno-implicit-function-declaration \
3-
// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - %s \
3+
// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
4+
// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
45
// RUN: | FileCheck %s
56

67
// -ffast-math
78
// RUN: %clang_cc1 -Wno-implicit-function-declaration \
8-
// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
9-
// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
9+
// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
10+
// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
1011
// RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
1112
// RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
1213
// RUN: | FileCheck %s -check-prefix=FAST
1314

1415
// -O0
1516
// RUN: %clang_cc1 -Wno-implicit-function-declaration \
16-
// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
17+
// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
18+
// RUN: -fno-rounding-math -O0 \
1719
// RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
1820

1921
#pragma float_control(precise,on)
2022
float f1(float x) {
2123
return sqrtf(x);
2224
}
2325

24-
// CHECK-LABEL: define dso_local float @f1
26+
// CHECK-LABEL: define {{.*}} float @f1
2527
// CHECK: tail call float @sqrtf(float noundef {{.*}}) #[[ATTR4_O2:[0-9]+]]
2628

27-
// FAST-LABEL: define dso_local nofpclass(nan inf) float @f1
29+
// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f1
2830
// FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan inf) {{.*}}) #[[ATTR3_FAST:[0-9]+]]
2931

30-
// NOOPT-LABEL: define dso_local float @f1
32+
// NOOPT-LABEL: define {{.*}} float @f1
3133
// NOOPT: call float @sqrtf(float noundef {{.*}}) #[[ATTR4_NOOPT:[0-9]+]]
3234

3335
#pragma float_control(precise,off)
3436
float f2(float x) {
3537
return sqrtf(x);
3638
}
3739

38-
// CHECK-LABEL: define dso_local float @f2
40+
// CHECK-LABEL: define {{.*}} float @f2
3941
// CHECK: tail call fast float @llvm.sqrt.f32(float {{.*}})
4042

41-
// FAST-LABEL: define dso_local nofpclass(nan inf) float @f2
43+
// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f2
4244
// FAST: call fast float @llvm.sqrt.f32(float {{.*}})
4345

44-
// NOOPT-LABEL: define dso_local float @f2
46+
// NOOPT-LABEL: define {{.*}} float @f2
4547
// NOOPT: call float @sqrtf(float {{.*}}) #[[ATTR4_NOOPT:[0-9]+]]
4648

4749
__attribute__((optnone))
@@ -50,13 +52,13 @@ float f3(float x) {
5052
return x;
5153
}
5254

53-
// CHECK-LABEL: define dso_local float @f3
55+
// CHECK-LABEL: define {{.*}} float @f3
5456
// CHECK: call float @sqrtf(float noundef {{.*}})
5557

56-
// FAST-LABEL: define dso_local nofpclass(nan inf) float @f3
58+
// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f3
5759
// FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan inf) {{.*}}) #[[ATTR4_FAST:[0-9]+]]
5860

59-
// NOOPT-LABEL: define dso_local float @f3
61+
// NOOPT-LABEL: define {{.*}} float @f3
6062
// NOOPT: call float @sqrtf(float noundef %0) #[[ATTR4_NOOPT:[0-9]+]]
6163

6264
// CHECK: [[ATTR4_O2]] = { nounwind }

0 commit comments

Comments
 (0)