[PATCH] D159486: Fix build error in CI.

2023-09-11 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment.

Hi @zahiraam ,

I have a couple of downstream testcases that fail with this patch.
Before

  > clang bbi-86364.c -lm -O3
  > ./a.out

passed but with the patch the assert in the program fails:

  a.out: bbi-86364.c:9: int main(): Assertion `(*__errno_location ()) == 33' 
failed.

Is this as expected?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd4ff8f815c21: Fix buildbot failure (authored by zahiraam).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

Files:
  clang/test/CodeGen/math-errno.c


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - 
%s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros 
-mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)
@@ -21,13 +23,13 @@
   return sqrtf(x);
 }
 
-// CHECK-LABEL: define dso_local float @f1
+// CHECK-LABEL: define {{.*}} float @f1
 // CHECK: tail call float @sqrtf(float noundef {{.*}}) #[[ATTR4_O2:[0-9]+]]
 
-// FAST-LABEL: define dso_local nofpclass(nan inf) float @f1
+// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f1
 // FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan 
inf) {{.*}}) #[[ATTR3_FAST:[0-9]+]]
 
-// NOOPT-LABEL: define dso_local float @f1
+// NOOPT-LABEL: define {{.*}} float @f1
 // NOOPT: call float @sqrtf(float noundef {{.*}}) #[[ATTR4_NOOPT:[0-9]+]]
 
 #pragma float_control(precise,off)
@@ -35,13 +37,13 @@
   return sqrtf(x);
 }
 
-// CHECK-LABEL: define dso_local float @f2
+// CHECK-LABEL: define {{.*}} float @f2
 // CHECK: tail call fast float @llvm.sqrt.f32(float {{.*}})
 
-// FAST-LABEL: define dso_local nofpclass(nan inf) float @f2
+// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f2
 // FAST: call fast float @llvm.sqrt.f32(float {{.*}})
 
-// NOOPT-LABEL: define dso_local float @f2
+// NOOPT-LABEL: define {{.*}} float @f2
 // NOOPT: call float @sqrtf(float {{.*}}) #[[ATTR4_NOOPT:[0-9]+]]
 
 __attribute__((optnone))
@@ -50,13 +52,13 @@
   return x;
 }
 
-// CHECK-LABEL: define dso_local float @f3
+// CHECK-LABEL: define {{.*}} float @f3
 // CHECK: call float @sqrtf(float noundef {{.*}})
 
-// FAST-LABEL: define dso_local nofpclass(nan inf) float @f3
+// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f3
 // FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan 
inf) {{.*}}) #[[ATTR4_FAST:[0-9]+]]
 
-// NOOPT-LABEL: define dso_local float @f3
+// NOOPT-LABEL: define {{.*}} float @f3
 // NOOPT:  call float @sqrtf(float noundef %0) #[[ATTR4_NOOPT:[0-9]+]]
 
 // CHECK: [[ATTR4_O2]] = { nounwind }


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - %s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)
@@ -21,13 +23,13 @@
   re

[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment.

In D159486#4642317 , @smeenai wrote:

> I don't think pre-merge testing covers Mac, only Linux and Windows (which is 
> presumably how the original breakage got in). If the test passes for you 
> locally I'd just push it and monitor the bots afterwards. (That isn't general 
> advice, but in this specific case, since we already have broken bots, I think 
> it's worth prioritizing a potential fix for them over waiting for previously 
> known-good configurations.)

Done. Thanks.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

I don't think pre-merge testing covers Mac, only Linux and Windows (which is 
presumably how the original breakage got in). If the test passes for you 
locally I'd just push it and monitor the bots afterwards. (That isn't general 
advice, but in this specific case, since we already have broken bots, I think 
it's worth prioritizing a potential fix for them over waiting for previously 
known-good configurations.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment.

In D159486#4642309 , @smeenai wrote:

> The `-triple x86_64-unknown-unknown` shouldn't be required after the regex 
> change, but I'm fine either way. I'd recommend pushing this to fix the bots, 
> and Aaron/Nico can do a post-commit review if they have any other comments.

Should I push it right away or wait until pre-merge testing terminates?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.

The `-triple x86_64-unknown-unknown` shouldn't be required after the regex 
change, but I'm fine either way. I'd recommend pushing this to fix the bots, 
and Aaron/Nico can do a post-commit review if they have any other comments.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment.

In D159486#4642305 , @smeenai wrote:

> Generally it's preferred to either push bot failure fixes directly or revert 
> the original commit (also without review), to get bots unblocked as soon as 
> possible :)
>
> From what I can see, the test failure is because `dso_local` isn't emitted on 
> Mac. That seems incidental to the point of your test, so using a regex match 
> instead might be preferable.

Thanks.  I am going to continue with a review since I started it. It should 
work now. Thanks for the suggestion (I always forget about RE and MAC :-).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 556301.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

Files:
  clang/test/CodeGen/math-errno.c


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - 
%s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros 
-mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)
@@ -21,13 +23,13 @@
   return sqrtf(x);
 }
 
-// CHECK-LABEL: define dso_local float @f1
+// CHECK-LABEL: define {{.*}} float @f1
 // CHECK: tail call float @sqrtf(float noundef {{.*}}) #[[ATTR4_O2:[0-9]+]]
 
-// FAST-LABEL: define dso_local nofpclass(nan inf) float @f1
+// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f1
 // FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan 
inf) {{.*}}) #[[ATTR3_FAST:[0-9]+]]
 
-// NOOPT-LABEL: define dso_local float @f1
+// NOOPT-LABEL: define {{.*}} float @f1
 // NOOPT: call float @sqrtf(float noundef {{.*}}) #[[ATTR4_NOOPT:[0-9]+]]
 
 #pragma float_control(precise,off)
@@ -35,13 +37,13 @@
   return sqrtf(x);
 }
 
-// CHECK-LABEL: define dso_local float @f2
+// CHECK-LABEL: define {{.*}} float @f2
 // CHECK: tail call fast float @llvm.sqrt.f32(float {{.*}})
 
-// FAST-LABEL: define dso_local nofpclass(nan inf) float @f2
+// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f2
 // FAST: call fast float @llvm.sqrt.f32(float {{.*}})
 
-// NOOPT-LABEL: define dso_local float @f2
+// NOOPT-LABEL: define {{.*}} float @f2
 // NOOPT: call float @sqrtf(float {{.*}}) #[[ATTR4_NOOPT:[0-9]+]]
 
 __attribute__((optnone))
@@ -50,13 +52,13 @@
   return x;
 }
 
-// CHECK-LABEL: define dso_local float @f3
+// CHECK-LABEL: define {{.*}} float @f3
 // CHECK: call float @sqrtf(float noundef {{.*}})
 
-// FAST-LABEL: define dso_local nofpclass(nan inf) float @f3
+// FAST-LABEL: define {{.*}} nofpclass(nan inf) float @f3
 // FAST: call fast nofpclass(nan inf) float @sqrtf(float noundef nofpclass(nan 
inf) {{.*}}) #[[ATTR4_FAST:[0-9]+]]
 
-// NOOPT-LABEL: define dso_local float @f3
+// NOOPT-LABEL: define {{.*}} float @f3
 // NOOPT:  call float @sqrtf(float noundef %0) #[[ATTR4_NOOPT:[0-9]+]]
 
 // CHECK: [[ATTR4_O2]] = { nounwind }


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - %s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)
@@ -21,13 +23,13 @@
   return sqrtf(x);
 }
 
-// CHECK-LABEL: define dso_local float @f1
+// CHECK-LABEL: define {{.*}} float @f1
 // CHECK: tail call float @sqrtf(float noundef {{.*}}) #[[ATTR4_O2:[0-9]+]]
 
-// FAST-LABEL: 

[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

Generally it's preferred to either push bot failure fixes directly or revert 
the original commit (also without review), to get bots unblocked as soon as 
possible :)

From what I can see, the test failure is because `dso_local` isn't emitted on 
Mac. That seems incidental to the point of your test, so using a regex match 
instead might be preferable.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 556297.
zahiraam added a reviewer: thakis.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159486/new/

https://reviews.llvm.org/D159486

Files:
  clang/test/CodeGen/math-errno.c


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - 
%s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros 
-mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - %s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D159486: Fix build error in CI.

2023-09-08 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam created this revision.
zahiraam added a reviewer: aaron.ballman.
Herald added a project: All.
zahiraam requested review of this revision.
Herald added a project: clang.

Fix buildbot failure  https://lab.llvm.org/buildbot/#/builders/38/builds/14427.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159486

Files:
  clang/test/CodeGen/math-errno.c


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - 
%s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros 
-mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)


Index: clang/test/CodeGen/math-errno.c
===
--- clang/test/CodeGen/math-errno.c
+++ clang/test/CodeGen/math-errno.c
@@ -1,19 +1,21 @@
 // -O2
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O2 -emit-llvm -o - %s \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O2 -emit-llvm -o - %s \
 // RUN: | FileCheck %s
 
 // -ffast-math
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -menable-no-infs -menable-no-nans -fapprox-func \
-// RUN: -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
+// RUN: -triple x86_64-unknown-unknown -menable-no-infs -menable-no-nans \
+// RUN: -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate \
 // RUN: -freciprocal-math -ffp-contract=fast -fno-rounding-math -ffast-math \
 // RUN: -ffinite-math-only -ffast-math -emit-llvm -o - %s \
 // RUN: | FileCheck %s -check-prefix=FAST
 
 // -O0
 // RUN: %clang_cc1 -Wno-implicit-function-declaration  \
-// RUN: -fmath-errno -ffp-contract=on -fno-rounding-math -O0 \
+// RUN: -triple x86_64-unknown-unknown -fmath-errno -ffp-contract=on \
+// RUN: -fno-rounding-math -O0 \
 // RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=NOOPT
 
 #pragma float_control(precise,on)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits