Fix errors in use of strictfp attribute.
authorKevin P. Neal <kevin.neal@sas.com>
Fri, 29 May 2020 16:17:23 +0000 (12:17 -0400)
committerKevin P. Neal <kevin.neal@sas.com>
Fri, 29 May 2020 16:28:14 +0000 (12:28 -0400)
Errors spotted with use of: https://reviews.llvm.org/D68233

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

index 5091c3d..ae1f748 100644 (file)
@@ -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
index b62532e..de05293 100644 (file)
@@ -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:
index 590705a..6fcf466 100644 (file)
@@ -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",
index 47c0d5c..c251fd7 100644 (file)
@@ -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:
index ac677b2..8dfe66b 100644 (file)
@@ -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",
index d4590a5..3f56165 100644 (file)
@@ -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