zahiraam created this revision.
zahiraam added reviewers: jrtc27, saugustine, aaron.ballman.
Herald added a project: All.
zahiraam requested review of this revision.
Herald added a project: clang.

See details in comment https://reviews.llvm.org/D135097#3859893 and 
https://reviews.llvm.org/D135097#3859917


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136084

Files:
  clang/test/CodeGen/func-attr.c


Index: clang/test/CodeGen/func-attr.c
===================================================================
--- clang/test/CodeGen/func-attr.c
+++ clang/test/CodeGen/func-attr.c
@@ -1,12 +1,12 @@
-// RUN: %clang -c -ffast-math -emit-llvm -S -o - %s \
-// RUN: | FileCheck %s
+// RUN: %clang -c -O2 -target x86_64 -ffast-math\
+// RUN: -emit-llvm -S -o - %s  | FileCheck %s
 
-// RUN: %clang -c -funsafe-math-optimizations -emit-llvm -S -o - %s \
-// RUN: | FileCheck %s
+// RUN: %clang -c -O2 -target x86_64 -funsafe-math-optimizations \
+// RUN: -emit-llvm -S -o - %s | FileCheck %s
 
 float foo(float a, float b) {
   return a+b;
 }
 
-// CHECK: define{{.*}} float @foo(float noundef %{{.*}}, float noundef 
%{{.*}}) [[FAST_ATTRS:#[0-9]+]]
+// CHECK: define{{.*}} float @foo(float noundef %{{.*}}, float noundef 
%{{.*}}) {{.*}} [[FAST_ATTRS:#[0-9]+]]
 // CHECK: attributes [[FAST_ATTRS]] = { {{.*}} "approx-func-fp-math"="true" 
{{.*}} "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" {{.*}} 
"unsafe-fp-math"="true"


Index: clang/test/CodeGen/func-attr.c
===================================================================
--- clang/test/CodeGen/func-attr.c
+++ clang/test/CodeGen/func-attr.c
@@ -1,12 +1,12 @@
-// RUN: %clang -c -ffast-math -emit-llvm -S -o - %s \
-// RUN: | FileCheck %s
+// RUN: %clang -c -O2 -target x86_64 -ffast-math\
+// RUN: -emit-llvm -S -o - %s  | FileCheck %s
 
-// RUN: %clang -c -funsafe-math-optimizations -emit-llvm -S -o - %s \
-// RUN: | FileCheck %s
+// RUN: %clang -c -O2 -target x86_64 -funsafe-math-optimizations \
+// RUN: -emit-llvm -S -o - %s | FileCheck %s
 
 float foo(float a, float b) {
   return a+b;
 }
 
-// CHECK: define{{.*}} float @foo(float noundef %{{.*}}, float noundef %{{.*}}) [[FAST_ATTRS:#[0-9]+]]
+// CHECK: define{{.*}} float @foo(float noundef %{{.*}}, float noundef %{{.*}}) {{.*}} [[FAST_ATTRS:#[0-9]+]]
 // CHECK: attributes [[FAST_ATTRS]] = { {{.*}} "approx-func-fp-math"="true" {{.*}} "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" {{.*}} "unsafe-fp-math"="true"
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to