[llvm] c21a4f8 - Fix errors in use of strictfp attribute.

Kevin P. Neal via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 09:28:31 PDT 2020


Author: Kevin P. Neal
Date: 2020-05-29T12:28:14-04:00
New Revision: c21a4f84b0e83aaf8f5390f6299a8857197f96c4

URL: https://github.com/llvm/llvm-project/commit/c21a4f84b0e83aaf8f5390f6299a8857197f96c4
DIFF: https://github.com/llvm/llvm-project/commit/c21a4f84b0e83aaf8f5390f6299a8857197f96c4.diff

LOG: Fix errors in use of strictfp attribute.

Errors spotted with use of: https://reviews.llvm.org/D68233

Added: 
    

Modified: 
    llvm/test/CodeGen/SystemZ/fp-strict-alias.ll
    llvm/test/CodeGen/SystemZ/fp-strict-cmp-04.ll
    llvm/test/CodeGen/SystemZ/fp-strict-cmp-05.ll
    llvm/test/CodeGen/SystemZ/fp-strict-cmps-04.ll
    llvm/test/CodeGen/SystemZ/fp-strict-cmps-05.ll
    llvm/test/CodeGen/SystemZ/vec-strict-conv-02.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/SystemZ/fp-strict-alias.ll b/llvm/test/CodeGen/SystemZ/fp-strict-alias.ll
index 5091c3dc97ba..ae1f748d6251 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-alias.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-alias.ll
@@ -349,7 +349,10 @@ define void @f17(float %in, float* %out) #0 {
 ; CHECK: sqebr
 ; CHECK: ste
 ; CHECK: jg bar
-  %sqrt = call float @llvm.sqrt.f32(float %in)
+  %sqrt = call float @llvm.experimental.constrained.sqrt.f32(
+                        float %in,
+                        metadata !"round.dynamic",
+                        metadata !"fpexcept.ignore") #0
   store float %sqrt, float* %out, align 4
   tail call void @bar() #0
   ret void

diff  --git a/llvm/test/CodeGen/SystemZ/fp-strict-cmp-04.ll b/llvm/test/CodeGen/SystemZ/fp-strict-cmp-04.ll
index b62532ed6f7c..de052935a41f 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-cmp-04.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-cmp-04.ll
@@ -111,7 +111,7 @@ exit:
 }
 
 ; Subtraction also provides a zero-based CC value.
-define float @f5(float %a, float %b, float *%dest) {
+define float @f5(float %a, float %b, float *%dest) #0 {
 ; CHECK-LABEL: f5:
 ; CHECK: seb %f0, 0(%r2)
 ; CHECK-NEXT: bnher %r14
@@ -144,7 +144,7 @@ define float @f6(float %dummy, float %a, float *%dest) #0 {
 ; CHECK-NEXT: bhr %r14
 ; CHECK: br %r14
 entry:
-  %res = call float @llvm.fabs.f32(float %a)
+  %res = call float @llvm.fabs.f32(float %a) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %res, float 0.0,
                                                metadata !"ogt",
@@ -167,7 +167,7 @@ define float @f7(float %dummy, float %a, float *%dest) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %abs = call float @llvm.fabs.f32(float %a)
+  %abs = call float @llvm.fabs.f32(float %a) #0
   %res = fneg float %abs
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %res, float 0.0,
@@ -308,7 +308,7 @@ define float @f12(float %dummy, float %val) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %ret = call float asm "blah $1", "=f,{f0}"(float %val)
+  %ret = call float asm "blah $1", "=f,{f0}"(float %val) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %val, float 0.0,
                                                metadata !"olt",
@@ -316,7 +316,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:
@@ -333,7 +333,7 @@ define double @f13(double %dummy, double %val) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %ret = call double asm "blah $1", "=f,{f0}"(double %val)
+  %ret = call double asm "blah $1", "=f,{f0}"(double %val) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f64(
                                                double %val, double 0.0,
                                                metadata !"olt",
@@ -341,7 +341,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:
@@ -374,7 +374,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:
@@ -392,7 +392,7 @@ define float @f15(float %val, float %dummy) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %ret = call float asm "blah $1", "=f,{f2}"(float %val)
+  %ret = call float asm "blah $1", "=f,{f2}"(float %val) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %val, float 0.0,
                                                metadata !"olt",
@@ -400,7 +400,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:
@@ -418,7 +418,7 @@ define double @f16(double %val, double %dummy) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %ret = call double asm "blah $1", "=f,{f2}"(double %val)
+  %ret = call double asm "blah $1", "=f,{f2}"(double %val) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f64(
                                                double %val, double 0.0,
                                                metadata !"olt",
@@ -426,7 +426,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:
@@ -471,7 +471,7 @@ entry:
                         float %a, float %b,
                         metadata !"round.dynamic",
                         metadata !"fpexcept.strict") #0
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %res, float 0.0,
                                                metadata !"oeq",
@@ -498,7 +498,7 @@ define float @f19(float %dummy, float %val) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %ret = call float asm sideeffect "blah $1", "=f,{f0}"(float %val)
+  %ret = call float asm sideeffect "blah $1", "=f,{f0}"(float %val) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %val, float 0.0,
                                                metadata !"olt",
@@ -506,7 +506,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:

diff  --git a/llvm/test/CodeGen/SystemZ/fp-strict-cmp-05.ll b/llvm/test/CodeGen/SystemZ/fp-strict-cmp-05.ll
index 590705a5504e..6fcf46685ee9 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-cmp-05.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-cmp-05.ll
@@ -41,7 +41,7 @@ define float @f3(float %a, float %b, float %f) #0 {
 ; CHECK-LABEL: f3:
 ; CHECK: ltebr
 ; CHECK-NEXT: ber %r14
-  %abs = call float @llvm.fabs.f32(float %f)
+  %abs = call float @llvm.fabs.f32(float %f) #0
   %neg = fneg float %abs
   %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %neg, float 0.0,
@@ -57,7 +57,7 @@ define double @f4(double %a, double %b, double %f) #0 {
 ; CHECK-LABEL: f4:
 ; CHECK: ltdbr
 ; CHECK-NEXT: ber %r14
-  %abs = call double @llvm.fabs.f64(double %f)
+  %abs = call double @llvm.fabs.f64(double %f) #0
   %neg = fneg double %abs
   %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
                                                double %neg, double 0.0,
@@ -73,7 +73,7 @@ define float @f5(float %a, float %b, float %f) #0 {
 ; CHECK-LABEL: f5:
 ; CHECK: ltebr
 ; CHECK-NEXT: ber %r14
-  %abs = call float @llvm.fabs.f32(float %f)
+  %abs = call float @llvm.fabs.f32(float %f) #0
   %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
                                                float %abs, float 0.0,
                                                metadata !"oeq",
@@ -87,7 +87,7 @@ define double @f6(double %a, double %b, double %f) #0 {
 ; CHECK-LABEL: f6:
 ; CHECK: ltdbr
 ; CHECK-NEXT: ber %r14
-  %abs = call double @llvm.fabs.f64(double %f)
+  %abs = call double @llvm.fabs.f64(double %f) #0
   %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
                                                double %abs, double 0.0,
                                                metadata !"oeq",

diff  --git a/llvm/test/CodeGen/SystemZ/fp-strict-cmps-04.ll b/llvm/test/CodeGen/SystemZ/fp-strict-cmps-04.ll
index 47c0d5caa37a..c251fd772d20 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-cmps-04.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-cmps-04.ll
@@ -46,7 +46,7 @@ define float @f6(float %dummy, float %a, float *%dest) #0 {
 ; CHECK-NEXT: bhr %r14
 ; CHECK: br %r14
 entry:
-  %res = call float @llvm.fabs.f32(float %a)
+  %res = call float @llvm.fabs.f32(float %a) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmps.f32(
                                                float %res, float 0.0,
                                                metadata !"ogt",
@@ -70,7 +70,7 @@ define float @f7(float %dummy, float %a, float *%dest) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %abs = call float @llvm.fabs.f32(float %a)
+  %abs = call float @llvm.fabs.f32(float %a) #0
   %res = fneg float %abs
   %cmp = call i1 @llvm.experimental.constrained.fcmps.f32(
                                                float %res, float 0.0,
@@ -122,7 +122,7 @@ define float @f12(float %dummy, float %val) #0 {
 ; CHECK-NEXT: blr %r14
 ; CHECK: br %r14
 entry:
-  %ret = call float asm "blah $1", "=f,{f0}"(float %val)
+  %ret = call float asm "blah $1", "=f,{f0}"(float %val) #0
   %cmp = call i1 @llvm.experimental.constrained.fcmps.f32(
                                                float %val, float 0.0,
                                                metadata !"olt",
@@ -130,7 +130,7 @@ entry:
   br i1 %cmp, label %exit, label %store
 
 store:
-  call void asm sideeffect "blah", ""()
+  call void asm sideeffect "blah", ""() #0
   br label %exit
 
 exit:

diff  --git a/llvm/test/CodeGen/SystemZ/fp-strict-cmps-05.ll b/llvm/test/CodeGen/SystemZ/fp-strict-cmps-05.ll
index ac677b29619b..8dfe66b5d46c 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-cmps-05.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-cmps-05.ll
@@ -41,7 +41,7 @@ define float @f3(float %a, float %b, float %f) #0 {
 ; CHECK-LABEL: f3:
 ; CHECK: kebr
 ; CHECK-NEXT: ber %r14
-  %abs = call float @llvm.fabs.f32(float %f)
+  %abs = call float @llvm.fabs.f32(float %f) #0
   %neg = fneg float %abs
   %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
                                                float %neg, float 0.0,
@@ -57,7 +57,7 @@ define double @f4(double %a, double %b, double %f) #0 {
 ; CHECK-LABEL: f4:
 ; CHECK: kdbr
 ; CHECK-NEXT: ber %r14
-  %abs = call double @llvm.fabs.f64(double %f)
+  %abs = call double @llvm.fabs.f64(double %f) #0
   %neg = fneg double %abs
   %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
                                                double %neg, double 0.0,
@@ -73,7 +73,7 @@ define float @f5(float %a, float %b, float %f) #0 {
 ; CHECK-LABEL: f5:
 ; CHECK: kebr
 ; CHECK-NEXT: ber %r14
-  %abs = call float @llvm.fabs.f32(float %f)
+  %abs = call float @llvm.fabs.f32(float %f) #0
   %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
                                                float %abs, float 0.0,
                                                metadata !"oeq",
@@ -87,7 +87,7 @@ define double @f6(double %a, double %b, double %f) #0 {
 ; CHECK-LABEL: f6:
 ; CHECK: kdbr
 ; CHECK-NEXT: ber %r14
-  %abs = call double @llvm.fabs.f64(double %f)
+  %abs = call double @llvm.fabs.f64(double %f) #0
   %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
                                                double %abs, double 0.0,
                                                metadata !"oeq",

diff  --git a/llvm/test/CodeGen/SystemZ/vec-strict-conv-02.ll b/llvm/test/CodeGen/SystemZ/vec-strict-conv-02.ll
index d4590a57d3ed..3f561654c364 100644
--- a/llvm/test/CodeGen/SystemZ/vec-strict-conv-02.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-strict-conv-02.ll
@@ -9,7 +9,7 @@ declare <2 x double> @llvm.experimental.constrained.fpext.v2f64.v2f32(<2 x float
 declare double @llvm.experimental.constrained.fpext.f64.f32(float, metadata)
 
 ; Test cases where both elements of a v2f64 are converted to f32s.
-define void @f1(<2 x double> %val, <2 x float> *%ptr) {
+define void @f1(<2 x double> %val, <2 x float> *%ptr) #0 {
 ; CHECK-LABEL: f1:
 ; CHECK: vledb {{%v[0-9]+}}, %v24, 0, 0
 ; CHECK: br %r14
@@ -35,7 +35,7 @@ define float @f2(<2 x double> %vec) #0 {
 }
 
 ; Test cases where even elements of a v4f32 are converted to f64s.
-define <2 x double> @f3(<4 x float> %vec) {
+define <2 x double> @f3(<4 x float> %vec) #0 {
 ; CHECK-LABEL: f3:
 ; CHECK: vldeb %v24, {{%v[0-9]+}}
 ; CHECK: br %r14
@@ -47,7 +47,7 @@ define <2 x double> @f3(<4 x float> %vec) {
 }
 
 ; Test conversion of an f32 in a vector register to an f64.
-define double @f4(<4 x float> %vec) {
+define double @f4(<4 x float> %vec) #0 {
 ; CHECK-LABEL: f4:
 ; CHECK: wldeb %f0, %v24
 ; CHECK: br %r14


        


More information about the llvm-commits mailing list