[clang] 0a175ad - [clang][patch][FPEnv] Fix syntax errors in pragma float_control test
Melanie Blower via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 30 07:00:13 PDT 2021
Author: Melanie Blower
Date: 2021-07-30T09:59:45-04:00
New Revision: 0a175ad445f095caf59f7175fbc035464919b7a3
URL: https://github.com/llvm/llvm-project/commit/0a175ad445f095caf59f7175fbc035464919b7a3
DIFF: https://github.com/llvm/llvm-project/commit/0a175ad445f095caf59f7175fbc035464919b7a3.diff
LOG: [clang][patch][FPEnv] Fix syntax errors in pragma float_control test
In a post-commit message to https://reviews.llvm.org/D102343
@MaskRay pointed out syntax errors in one of the test cases. This
patch fixes those problems, I had forgotten the colon after the CHECK- strings.
Added:
Modified:
clang/test/CodeGen/fp-floatcontrol-stack.cpp
Removed:
################################################################################
diff --git a/clang/test/CodeGen/fp-floatcontrol-stack.cpp b/clang/test/CodeGen/fp-floatcontrol-stack.cpp
index 35908dbc579fd..3de3af0cbad05 100644
--- a/clang/test/CodeGen/fp-floatcontrol-stack.cpp
+++ b/clang/test/CodeGen/fp-floatcontrol-stack.cpp
@@ -6,10 +6,10 @@
#define FUN(n) \
(float z) { return n * z + n; }
-// CHECK-DDEFAULT Function Attrs: noinline nounwind optnone mustprogress
-// CHECK-DEBSTRICT Function Attrs: noinline nounwind optnone strictfp mustprogress
-// CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone
-// CHECK-NOHONOR Function Attrs: noinline nounwind optnone mustprogress
+// CHECK-DDEFAULT: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+// CHECK-DEBSTRICT: Function Attrs: mustprogress noinline nounwind optnone strictfp{{$$}}
+// CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+// CHECK-NOHONOR: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
float fun_default FUN(1)
//CHECK-LABEL: define {{.*}} @_Z11fun_defaultf{{.*}}
#if DEFAULT
@@ -32,10 +32,10 @@ float fun_default FUN(1)
// Rule: precise must be enabled
#pragma float_control(except, on)
#endif
- // CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone
- // CHECK-DDEFAULT Function Attrs: noinline nounwind optnone strictfp mustprogress
- // CHECK-DEBSTRICT Function Attrs: noinline nounwind optnone strictfp mustprogress
- // CHECK-NOHONOR Function Attrs: noinline nounwind optnone strictfp mustprogress
+ // CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+ // CHECK-DDEFAULT: Function Attrs: mustprogress noinline nounwind optnone strictfp{{$$}}
+ // CHECK-DEBSTRICT: Function Attrs: mustprogress noinline nounwind optnone strictfp{{$$}}
+ // CHECK-NOHONOR: Function Attrs: mustprogress noinline nounwind optnone strictfp{{$$}}
float exc_on FUN(2)
//CHECK-LABEL: define {{.*}} @_Z6exc_onf{{.*}}
#if DEFAULT
@@ -54,10 +54,10 @@ float fun_default FUN(1)
#endif
#pragma float_control(pop)
- // CHECK-DDEFAULT Function Attrs: noinline nounwind optnone mustprogress
- // CHECK-DEBSTRICT Function Attrs: noinline nounwind optnone strictfp mustprogress
- // CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone
- // CHECK-NOHONOR Function Attrs: noinline nounwind optnone mustprogress
+ // CHECK-DDEFAULT: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+ // CHECK-DEBSTRICT: Function Attrs: mustprogress noinline nounwind optnone strictfp{{$$}}
+ // CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+ // CHECK-NOHONOR: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
float exc_pop FUN(5)
//CHECK-LABEL: define {{.*}} @_Z7exc_popf{{.*}}
#if DEFAULT
@@ -223,10 +223,10 @@ float fun_default FUN(1)
#pragma float_control(except, on)
#endif
float y();
-// CHECK-DDEFAULT Function Attrs: noinline nounwind optnone mustprogress
-// CHECK-DEBSTRICT Function Attrs: noinline nounwind optnone strictfp mustprogress
-// CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone
-// CHECK-NOHONOR Function Attrs: noinline nounwind optnone mustprogress
+// CHECK-DDEFAULT: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+// CHECK-DEBSTRICT: Function Attrs: noinline nounwind optnone strictfp{{$$}}
+// CHECK-FAST: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
+// CHECK-NOHONOR: Function Attrs: mustprogress noinline nounwind optnone{{$$}}
class ON {
// Settings for top level class initializer use program source setting.
float z = 2 + y() * 7;
@@ -246,14 +246,14 @@ class ON {
};
ON on;
#pragma float_control(except, off)
-// CHECK-DDEFAULT Function Attrs: noinline nounwind optnone
-// CHECK-DEBSTRICT Function Attrs: noinline nounwind optnone
-// CHECK-FAST: Function Attrs: noinline nounwind optnone
-// CHECK-NOHONOR Function Attrs: noinline nounwind optnone
+// CHECK-DDEFAULT: Function Attrs: noinline nounwind optnone{{$$}}
+// CHECK-DEBSTRICT: Function Attrs: noinline nounwind optnone{{$$}}
+// CHECK-FAST: Function Attrs: noinline nounwind optnone{{$$}}
+// CHECK-NOHONOR: Function Attrs: noinline nounwind optnone{{$$}}
class OFF {
float w = 2 + y() * 7;
-//CHECK-LABEL: define {{.*}} void @_ZN3OFFC2Ev{{.*}}
-//CHECK: call float {{.*}}llvm.fmuladd
+// CHECK-LABEL: define {{.*}} void @_ZN3OFFC2Ev{{.*}}
+// CHECK: call float {{.*}}llvm.fmuladd
};
OFF off;
@@ -267,9 +267,9 @@ struct MyComplex {
}
MyComplex() {}
const MyComplex operator+(const MyComplex other) const {
-//CHECK-LABEL: define {{.*}} @_ZNK9MyComplexplES_
-//CHECK: fadd reassoc float
-//CHECK: fadd reassoc float
+// CHECK-LABEL: define {{.*}} @_ZNK9MyComplexplES_
+// CHECK: fadd reassoc float
+// CHECK: fadd reassoc float
return MyComplex(xx + other.xx, yy + other.yy);
}
};
@@ -279,8 +279,8 @@ MyComplex useAdd() {
return a + b;
}
-// CHECK-DDEFAULT Function Attrs: noinline nounwind
-// CHECK-DEBSTRICT Function Attrs: noinline nounwind strictfp
-// CHECK-FAST: Function Attrs: noinline nounwind
-// CHECK-NOHONOR Function Attrs: noinline nounwind
+// CHECK-DDEFAULT: Function Attrs: noinline nounwind{{$$}}
+// CHECK-DEBSTRICT: Function Attrs: noinline nounwind strictfp{{$$}}
+// CHECK-FAST: Function Attrs: noinline nounwind{{$$}}
+// CHECK-NOHONOR: Function Attrs: noinline nounwind{{$$}}
// CHECK-LABEL: define{{.*}} @_GLOBAL__sub_I_fp_floatcontrol_stack
More information about the cfe-commits
mailing list