Skip to content

Commit a8c899b

Browse files
committed
Modify func-attr-fast-math.f90 test case to be resilient to other attributes being produced (e.g. target-cpu, target-features)
1 parent 6047b5a commit a8c899b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
! Test that -mframe-pointer can accept only specific values and when given an invalid value, check it raises an error.
1+
! REQUIRES: x86-registered-target
22

3-
! RUN: %flang -O1 -emit-llvm -S -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NOFASTMATH
4-
! RUN: %flang -Ofast -emit-llvm -S -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-OFAST
5-
! RUN: %flang -O1 -ffast-math -emit-llvm -S -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-FFAST-MATH
3+
! RUN: %flang --target=x86_64 -O1 -emit-llvm -S -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-NOFASTMATH
4+
! RUN: %flang --target=x86_64 -Ofast -emit-llvm -S -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-OFAST
5+
! RUN: %flang --target=x86_64 -O1 -ffast-math -emit-llvm -S -o - %s 2>&1| FileCheck %s --check-prefix=CHECK-FFAST-MATH
66

77
subroutine func
88
end subroutine func
99

1010
! CHECK-NOFASTMATH-LABEL: define void @func_() local_unnamed_addr
1111
! CHECK-NOFASTMATH-SAME: #[[ATTRS:[0-9]+]]
12-
! CHECK-NOFASTMATH: attributes #[[ATTRS]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
13-
!
12+
! CHECK-NOT fp-math"=
13+
1414
! CHECK-OFAST-LABEL: define void @func_() local_unnamed_addr
1515
! CHECK-OFAST-SAME: #[[ATTRS:[0-9]+]]
16-
! CHECK-OFAST: attributes #[[ATTRS]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "unsafe-fp-math"="true" }
16+
! CHECK-OFAST: attributes #[[ATTRS]] = { {{.*}}"approx-func-fp-math"="true" {{.*}}"no-infs-fp-math"="true" {{.*}}"no-nans-fp-math"="true" {{.*}}"no-signed-zeros-fp-math"="true" {{.*}}"unsafe-fp-math"="true"{{.*}} }
1717

1818
! CHECK-FFAST-MATH-LABEL: define void @func_() local_unnamed_addr
1919
! CHECK-FFAST-MATH-SAME: #[[ATTRS:[0-9]+]]
20-
! CHECK-FFAST-MATH: attributes #[[ATTRS]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "unsafe-fp-math"="true" }
20+
! CHECK-FFAST-MATH: attributes #[[ATTRS]] = { {{.*}}"approx-func-fp-math"="true" {{.*}}"no-infs-fp-math"="true" {{.*}}"no-nans-fp-math"="true" {{.*}}"no-signed-zeros-fp-math"="true" {{.*}}"unsafe-fp-math"="true"{{.*}} }

0 commit comments

Comments
 (0)