summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll
diff options
context:
space:
mode:
authorKevin P. Neal <kevin.neal@sas.com>2019-10-04 17:03:46 +0000
committerKevin P. Neal <kevin.neal@sas.com>2019-10-04 17:03:46 +0000
commit68b805212134ae16769e38af7da4861bb8b809dd (patch)
tree4b9d3101db485b0f5880eda7c9e81de5061bb3c4 /llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll
parent9819b9d35fad46783b4c6292b3ce2e414c9fe54a (diff)
downloadbcm5719-llvm-68b805212134ae16769e38af7da4861bb8b809dd.tar.gz
bcm5719-llvm-68b805212134ae16769e38af7da4861bb8b809dd.zip
[FPEnv] Strict FP tests should use the requisite function attributes.
A set of function attributes is required in any function that uses constrained floating point intrinsics. None of our tests use these attributes. This patch fixes this. These tests have been tested against the IR verifier changes in D68233. Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand Approved by: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D67925 llvm-svn: 373761
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll25
1 files changed, 13 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll b/llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll
index 4e90939d2e7..791c39301e4 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-sqrt-02.ll
@@ -7,19 +7,19 @@
declare double @llvm.experimental.constrained.sqrt.f64(double, metadata, metadata)
; Check register square root.
-define double @f1(double %val) {
+define double @f1(double %val) #0 {
; CHECK-LABEL: f1:
; CHECK: sqdbr %f0, %f0
; CHECK: br %r14
%res = call double @llvm.experimental.constrained.sqrt.f64(
double %val,
metadata !"round.dynamic",
- metadata !"fpexcept.strict")
+ metadata !"fpexcept.strict") #0
ret double %res
}
; Check the low end of the SQDB range.
-define double @f2(double *%ptr) {
+define double @f2(double *%ptr) #0 {
; CHECK-LABEL: f2:
; CHECK: sqdb %f0, 0(%r2)
; CHECK: br %r14
@@ -27,12 +27,12 @@ define double @f2(double *%ptr) {
%res = call double @llvm.experimental.constrained.sqrt.f64(
double %val,
metadata !"round.dynamic",
- metadata !"fpexcept.strict")
+ metadata !"fpexcept.strict") #0
ret double %res
}
; Check the high end of the aligned SQDB range.
-define double @f3(double *%base) {
+define double @f3(double *%base) #0 {
; CHECK-LABEL: f3:
; CHECK: sqdb %f0, 4088(%r2)
; CHECK: br %r14
@@ -41,13 +41,13 @@ define double @f3(double *%base) {
%res = call double @llvm.experimental.constrained.sqrt.f64(
double %val,
metadata !"round.dynamic",
- metadata !"fpexcept.strict")
+ metadata !"fpexcept.strict") #0
ret double %res
}
; Check the next doubleword up, which needs separate address logic.
; Other sequences besides this one would be OK.
-define double @f4(double *%base) {
+define double @f4(double *%base) #0 {
; CHECK-LABEL: f4:
; CHECK: aghi %r2, 4096
; CHECK: sqdb %f0, 0(%r2)
@@ -57,12 +57,12 @@ define double @f4(double *%base) {
%res = call double @llvm.experimental.constrained.sqrt.f64(
double %val,
metadata !"round.dynamic",
- metadata !"fpexcept.strict")
+ metadata !"fpexcept.strict") #0
ret double %res
}
; Check negative displacements, which also need separate address logic.
-define double @f5(double *%base) {
+define double @f5(double *%base) #0 {
; CHECK-LABEL: f5:
; CHECK: aghi %r2, -8
; CHECK: sqdb %f0, 0(%r2)
@@ -72,12 +72,12 @@ define double @f5(double *%base) {
%res = call double @llvm.experimental.constrained.sqrt.f64(
double %val,
metadata !"round.dynamic",
- metadata !"fpexcept.strict")
+ metadata !"fpexcept.strict") #0
ret double %res
}
; Check that SQDB allows indices.
-define double @f6(double *%base, i64 %index) {
+define double @f6(double *%base, i64 %index) #0 {
; CHECK-LABEL: f6:
; CHECK: sllg %r1, %r3, 3
; CHECK: sqdb %f0, 800(%r1,%r2)
@@ -88,7 +88,8 @@ define double @f6(double *%base, i64 %index) {
%res = call double @llvm.experimental.constrained.sqrt.f64(
double %val,
metadata !"round.dynamic",
- metadata !"fpexcept.strict")
+ metadata !"fpexcept.strict") #0
ret double %res
}
+attributes #0 = { strictfp }
OpenPOWER on IntegriCloud