[llvm] ac37755 - [SystemZ] Use fneg in test cases
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 10:08:51 PST 2019
Author: Ulrich Weigand
Date: 2019-11-20T19:08:27+01:00
New Revision: ac37755c60ba19103f08f04d07ca8f1d640153d6
URL: https://github.com/llvm/llvm-project/commit/ac37755c60ba19103f08f04d07ca8f1d640153d6
DIFF: https://github.com/llvm/llvm-project/commit/ac37755c60ba19103f08f04d07ca8f1d640153d6.diff
LOG: [SystemZ] Use fneg in test cases
Now that we have fneg, prefer using it over "fsub -0.0, ...".
This helps in particular with strict FP tests, as fneg does
not raise any exceptions.
Added:
Modified:
llvm/test/CodeGen/SystemZ/fp-abs-02.ll
llvm/test/CodeGen/SystemZ/fp-abs-04.ll
llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
llvm/test/CodeGen/SystemZ/fp-cmp-05.ll
llvm/test/CodeGen/SystemZ/fp-mul-08.ll
llvm/test/CodeGen/SystemZ/fp-mul-09.ll
llvm/test/CodeGen/SystemZ/fp-mul-10.ll
llvm/test/CodeGen/SystemZ/fp-neg-01.ll
llvm/test/CodeGen/SystemZ/fp-neg-02.ll
llvm/test/CodeGen/SystemZ/fp-strict-mul-08.ll
llvm/test/CodeGen/SystemZ/fp-strict-mul-09.ll
llvm/test/CodeGen/SystemZ/fp-strict-mul-10.ll
llvm/test/CodeGen/SystemZ/vec-abs-05.ll
llvm/test/CodeGen/SystemZ/vec-abs-06.ll
llvm/test/CodeGen/SystemZ/vec-mul-02.ll
llvm/test/CodeGen/SystemZ/vec-mul-04.ll
llvm/test/CodeGen/SystemZ/vec-mul-05.ll
llvm/test/CodeGen/SystemZ/vec-neg-01.ll
llvm/test/CodeGen/SystemZ/vec-neg-02.ll
llvm/test/CodeGen/SystemZ/vec-strict-mul-02.ll
llvm/test/CodeGen/SystemZ/vec-strict-mul-04.ll
llvm/test/CodeGen/SystemZ/vec-strict-mul-05.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/SystemZ/fp-abs-02.ll b/llvm/test/CodeGen/SystemZ/fp-abs-02.ll
index 2c70ca7dca11..48be0498043d 100644
--- a/llvm/test/CodeGen/SystemZ/fp-abs-02.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-abs-02.ll
@@ -10,7 +10,7 @@ define float @f1(float %f) {
; CHECK: lndfr %f0, %f0
; CHECK: br %r14
%abs = call float @llvm.fabs.f32(float %f)
- %res = fsub float -0.0, %abs
+ %res = fneg float %abs
ret float %res
}
@@ -21,7 +21,7 @@ define double @f2(double %f) {
; CHECK: lndfr %f0, %f0
; CHECK: br %r14
%abs = call double @llvm.fabs.f64(double %f)
- %res = fsub double -0.0, %abs
+ %res = fneg double %abs
ret double %res
}
@@ -36,7 +36,7 @@ define void @f3(fp128 *%ptr, fp128 *%ptr2) {
; CHECK: br %r14
%orig = load fp128, fp128 *%ptr
%abs = call fp128 @llvm.fabs.f128(fp128 %orig)
- %negabs = fsub fp128 0xL00000000000000008000000000000000, %abs
+ %negabs = fneg fp128 %abs
%op2 = load fp128, fp128 *%ptr2
%res = fdiv fp128 %negabs, %op2
store fp128 %res, fp128 *%ptr
diff --git a/llvm/test/CodeGen/SystemZ/fp-abs-04.ll b/llvm/test/CodeGen/SystemZ/fp-abs-04.ll
index 5676429d4331..6ec22292fb2c 100644
--- a/llvm/test/CodeGen/SystemZ/fp-abs-04.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-abs-04.ll
@@ -9,7 +9,7 @@ define float @f1(float %f) {
; CHECK: lndfr %f0, %f0
; CHECK: br %r14
%abs = call float @llvm.fabs.f32(float %f)
- %res = fsub float -0.0, %abs
+ %res = fneg float %abs
ret float %res
}
@@ -20,7 +20,7 @@ define double @f2(double %f) {
; CHECK: lndfr %f0, %f0
; CHECK: br %r14
%abs = call double @llvm.fabs.f64(double %f)
- %res = fsub double -0.0, %abs
+ %res = fneg double %abs
ret double %res
}
@@ -38,7 +38,7 @@ define void @f3(fp128 *%ptr, fp128 *%ptr2) {
; CHECK: br %r14
%orig = load fp128, fp128 *%ptr
%abs = call fp128 @llvm.fabs.f128(fp128 %orig)
- %negabs = fsub fp128 0xL00000000000000008000000000000000, %abs
+ %negabs = fneg fp128 %abs
%op2 = load fp128, fp128 *%ptr2
%res = fdiv fp128 %negabs, %op2
store fp128 %res, fp128 *%ptr
diff --git a/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll b/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
index 1e5e59eb659c..23ff1b7da288 100644
--- a/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
@@ -128,7 +128,7 @@ define float @f7(float %dummy, float %a, float *%dest) {
; CHECK: br %r14
entry:
%abs = call float @llvm.fabs.f32(float %a)
- %res = fsub float -0.0, %abs
+ %res = fneg float %abs
%cmp = fcmp olt float %res, 0.0
br i1 %cmp, label %exit, label %store
@@ -147,7 +147,7 @@ define float @f8(float %dummy, float %a, float *%dest) {
; CHECK-NEXT: bler %r14
; CHECK: br %r14
entry:
- %res = fsub float -0.0, %a
+ %res = fneg float %a
%cmp = fcmp ole float %res, 0.0
br i1 %cmp, label %exit, label %store
@@ -375,7 +375,7 @@ define float @f18(float %dummy, float %a, float *%dest) {
; CHECK: br %r14
entry:
%abs = call float @llvm.fabs.f32(float %a)
- %res = fsub float -0.0, %abs
+ %res = fneg float %abs
%cmp = fcmp ogt float %abs, 0.0
br i1 %cmp, label %exit, label %store
@@ -394,7 +394,7 @@ define float @f19(float %dummy, float %a, float *%dest) {
; CHECK-NEXT: bler %r14
; CHECK: br %r14
entry:
- %res = fsub float -0.0, %a
+ %res = fneg float %a
%cmp = fcmp oge float %a, 0.0
br i1 %cmp, label %exit, label %store
diff --git a/llvm/test/CodeGen/SystemZ/fp-cmp-05.ll b/llvm/test/CodeGen/SystemZ/fp-cmp-05.ll
index d25c8e78cc3e..a8580db41677 100644
--- a/llvm/test/CodeGen/SystemZ/fp-cmp-05.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-cmp-05.ll
@@ -11,7 +11,7 @@ define float @f1(float %a, float %b, float %f) {
; CHECK-LABEL: f1:
; CHECK: ltebr
; CHECK-NEXT: ber %r14
- %neg = fsub float -0.0, %f
+ %neg = fneg float %f
%cond = fcmp oeq float %neg, 0.0
%res = select i1 %cond, float %a, float %b
ret float %res
@@ -22,7 +22,7 @@ define double @f2(double %a, double %b, double %f) {
; CHECK-LABEL: f2:
; CHECK: ltdbr
; CHECK-NEXT: ber %r14
- %neg = fsub double -0.0, %f
+ %neg = fneg double %f
%cond = fcmp oeq double %neg, 0.0
%res = select i1 %cond, double %a, double %b
ret double %res
@@ -36,7 +36,7 @@ define float @f3(float %a, float %b, float %f) {
; CHECK: lpebr
; CHECK-NEXT: ber %r14
%abs = call float @llvm.fabs.f32(float %f)
- %neg = fsub float -0.0, %abs
+ %neg = fneg float %abs
%cond = fcmp oeq float %neg, 0.0
%res = select i1 %cond, float %a, float %b
ret float %res
@@ -49,7 +49,7 @@ define double @f4(double %a, double %b, double %f) {
; CHECK: lpdbr
; CHECK-NEXT: ber %r14
%abs = call double @llvm.fabs.f64(double %f)
- %neg = fsub double -0.0, %abs
+ %neg = fneg double %abs
%cond = fcmp oeq double %neg, 0.0
%res = select i1 %cond, double %a, double %b
ret double %res
diff --git a/llvm/test/CodeGen/SystemZ/fp-mul-08.ll b/llvm/test/CodeGen/SystemZ/fp-mul-08.ll
index 83f198b5894b..2aeaefc787ae 100644
--- a/llvm/test/CodeGen/SystemZ/fp-mul-08.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-mul-08.ll
@@ -11,7 +11,7 @@ define float @f1(float %f1, float %f2, float %acc) {
; CHECK-SCALAR: ler %f0, %f4
; CHECK-VECTOR: wfmssb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -23,7 +23,7 @@ define float @f2(float %f1, float *%ptr, float %acc) {
; CHECK-VECTOR: ldr %f0, %f2
; CHECK: br %r14
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -36,7 +36,7 @@ define float @f3(float %f1, float *%base, float %acc) {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 1023
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -53,7 +53,7 @@ define float @f4(float %f1, float *%base, float %acc) {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 1024
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -70,7 +70,7 @@ define float @f5(float %f1, float *%base, float %acc) {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 -1
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -84,7 +84,7 @@ define float @f6(float %f1, float *%base, i64 %index, float %acc) {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 %index
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -99,7 +99,7 @@ define float @f7(float %f1, float *%base, i64 %index, float %acc) {
%index2 = add i64 %index, 1023
%ptr = getelementptr float, float *%base, i64 %index2
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
@@ -115,7 +115,7 @@ define float @f8(float %f1, float *%base, i64 %index, float %acc) {
%index2 = add i64 %index, 1024
%ptr = getelementptr float, float *%base, i64 %index2
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
ret float %res
}
diff --git a/llvm/test/CodeGen/SystemZ/fp-mul-09.ll b/llvm/test/CodeGen/SystemZ/fp-mul-09.ll
index c66ab2f7c42c..2ad593517c7f 100644
--- a/llvm/test/CodeGen/SystemZ/fp-mul-09.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-mul-09.ll
@@ -11,7 +11,7 @@ define double @f1(double %f1, double %f2, double %acc) {
; CHECK-SCALAR: ldr %f0, %f4
; CHECK-VECTOR: wfmsdb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -22,7 +22,7 @@ define double @f2(double %f1, double *%ptr, double %acc) {
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -34,7 +34,7 @@ define double @f3(double %f1, double *%base, double %acc) {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 511
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -50,7 +50,7 @@ define double @f4(double %f1, double *%base, double %acc) {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 512
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -66,7 +66,7 @@ define double @f5(double %f1, double *%base, double %acc) {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 -1
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -79,7 +79,7 @@ define double @f6(double %f1, double *%base, i64 %index, double %acc) {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 %index
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -93,7 +93,7 @@ define double @f7(double %f1, double *%base, i64 %index, double %acc) {
%index2 = add i64 %index, 511
%ptr = getelementptr double, double *%base, i64 %index2
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
@@ -108,7 +108,7 @@ define double @f8(double %f1, double *%base, i64 %index, double %acc) {
%index2 = add i64 %index, 512
%ptr = getelementptr double, double *%base, i64 %index2
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
ret double %res
}
diff --git a/llvm/test/CodeGen/SystemZ/fp-mul-10.ll b/llvm/test/CodeGen/SystemZ/fp-mul-10.ll
index c23a6a202ad5..669ccbacf789 100644
--- a/llvm/test/CodeGen/SystemZ/fp-mul-10.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-mul-10.ll
@@ -8,7 +8,7 @@ define double @f1(double %f1, double %f2, double %acc) {
; CHECK: wfnmadb %f0, %f0, %f2, %f4
; CHECK: br %r14
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %acc)
- %negres = fsub double -0.0, %res
+ %negres = fneg double %res
ret double %negres
}
@@ -16,9 +16,9 @@ define double @f2(double %f1, double %f2, double %acc) {
; CHECK-LABEL: f2:
; CHECK: wfnmsdb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.fma.f64 (double %f1, double %f2, double %negacc)
- %negres = fsub double -0.0, %res
+ %negres = fneg double %res
ret double %negres
}
@@ -27,7 +27,7 @@ define float @f3(float %f1, float %f2, float %acc) {
; CHECK: wfnmasb %f0, %f0, %f2, %f4
; CHECK: br %r14
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %acc)
- %negres = fsub float -0.0, %res
+ %negres = fneg float %res
ret float %negres
}
@@ -35,9 +35,9 @@ define float @f4(float %f1, float %f2, float %acc) {
; CHECK-LABEL: f4:
; CHECK: wfnmssb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.fma.f32 (float %f1, float %f2, float %negacc)
- %negres = fsub float -0.0, %res
+ %negres = fneg float %res
ret float %negres
}
diff --git a/llvm/test/CodeGen/SystemZ/fp-neg-01.ll b/llvm/test/CodeGen/SystemZ/fp-neg-01.ll
index 679dd7188c4f..ff3a98231a67 100644
--- a/llvm/test/CodeGen/SystemZ/fp-neg-01.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-neg-01.ll
@@ -8,7 +8,7 @@ define float @f1(float %f) {
; CHECK-LABEL: f1:
; CHECK: lcdfr %f0, %f0
; CHECK: br %r14
- %res = fsub float -0.0, %f
+ %res = fneg float %f
ret float %res
}
@@ -17,7 +17,7 @@ define double @f2(double %f) {
; CHECK-LABEL: f2:
; CHECK: lcdfr %f0, %f0
; CHECK: br %r14
- %res = fsub double -0.0, %f
+ %res = fneg double %f
ret double %res
}
@@ -31,7 +31,7 @@ define void @f3(fp128 *%ptr, fp128 *%ptr2) {
; CHECK: br %r14
%orig = load fp128, fp128 *%ptr
%negzero = fpext float -0.0 to fp128
- %neg = fsub fp128 0xL00000000000000008000000000000000, %orig
+ %neg = fneg fp128 %orig
%op2 = load fp128, fp128 *%ptr2
%res = fdiv fp128 %neg, %op2
store fp128 %res, fp128 *%ptr
diff --git a/llvm/test/CodeGen/SystemZ/fp-neg-02.ll b/llvm/test/CodeGen/SystemZ/fp-neg-02.ll
index a721b837dca5..70ff19c80029 100644
--- a/llvm/test/CodeGen/SystemZ/fp-neg-02.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-neg-02.ll
@@ -7,7 +7,7 @@ define float @f1(float %f) {
; CHECK-LABEL: f1:
; CHECK: lcdfr %f0, %f0
; CHECK: br %r14
- %res = fsub float -0.0, %f
+ %res = fneg float %f
ret float %res
}
@@ -16,7 +16,7 @@ define double @f2(double %f) {
; CHECK-LABEL: f2:
; CHECK: lcdfr %f0, %f0
; CHECK: br %r14
- %res = fsub double -0.0, %f
+ %res = fneg double %f
ret double %res
}
@@ -33,7 +33,7 @@ define void @f3(fp128 *%ptr, fp128 *%ptr2) {
; CHECK: br %r14
%orig = load fp128, fp128 *%ptr
%negzero = fpext float -0.0 to fp128
- %neg = fsub fp128 0xL00000000000000008000000000000000, %orig
+ %neg = fneg fp128 %orig
%op2 = load fp128, fp128 *%ptr2
%res = fdiv fp128 %neg, %op2
store fp128 %res, fp128 *%ptr
diff --git a/llvm/test/CodeGen/SystemZ/fp-strict-mul-08.ll b/llvm/test/CodeGen/SystemZ/fp-strict-mul-08.ll
index 4c5101a795c0..a92191142562 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-mul-08.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-mul-08.ll
@@ -11,7 +11,7 @@ define float @f1(float %f1, float %f2, float %acc) #0 {
; CHECK-SCALAR: ler %f0, %f4
; CHECK-VECTOR: wfmssb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -26,7 +26,7 @@ define float @f2(float %f1, float *%ptr, float %acc) #0 {
; CHECK-VECTOR: ldr %f0, %f2
; CHECK: br %r14
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -42,7 +42,7 @@ define float @f3(float %f1, float *%base, float %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 1023
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -62,7 +62,7 @@ define float @f4(float %f1, float *%base, float %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 1024
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -82,7 +82,7 @@ define float @f5(float %f1, float *%base, float %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 -1
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -99,7 +99,7 @@ define float @f6(float %f1, float *%base, i64 %index, float %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr float, float *%base, i64 %index
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -117,7 +117,7 @@ define float @f7(float %f1, float *%base, i64 %index, float %acc) #0 {
%index2 = add i64 %index, 1023
%ptr = getelementptr float, float *%base, i64 %index2
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
@@ -136,7 +136,7 @@ define float @f8(float %f1, float *%base, i64 %index, float %acc) #0 {
%index2 = add i64 %index, 1024
%ptr = getelementptr float, float *%base, i64 %index2
%f2 = load float, float *%ptr
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
diff --git a/llvm/test/CodeGen/SystemZ/fp-strict-mul-09.ll b/llvm/test/CodeGen/SystemZ/fp-strict-mul-09.ll
index 357148c3b012..ffa7ea8235ee 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-mul-09.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-mul-09.ll
@@ -11,7 +11,7 @@ define double @f1(double %f1, double %f2, double %acc) #0 {
; CHECK-SCALAR: ldr %f0, %f4
; CHECK-VECTOR: wfmsdb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -25,7 +25,7 @@ define double @f2(double %f1, double *%ptr, double %acc) #0 {
; CHECK: ldr %f0, %f2
; CHECK: br %r14
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -40,7 +40,7 @@ define double @f3(double %f1, double *%base, double %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 511
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -59,7 +59,7 @@ define double @f4(double %f1, double *%base, double %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 512
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -78,7 +78,7 @@ define double @f5(double %f1, double *%base, double %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 -1
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -94,7 +94,7 @@ define double @f6(double %f1, double *%base, i64 %index, double %acc) #0 {
; CHECK: br %r14
%ptr = getelementptr double, double *%base, i64 %index
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -111,7 +111,7 @@ define double @f7(double %f1, double *%base, i64 %index, double %acc) #0 {
%index2 = add i64 %index, 511
%ptr = getelementptr double, double *%base, i64 %index2
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
@@ -129,7 +129,7 @@ define double @f8(double %f1, double *%base, i64 %index, double %acc) #0 {
%index2 = add i64 %index, 512
%ptr = getelementptr double, double *%base, i64 %index2
%f2 = load double, double *%ptr
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
diff --git a/llvm/test/CodeGen/SystemZ/fp-strict-mul-10.ll b/llvm/test/CodeGen/SystemZ/fp-strict-mul-10.ll
index a4291ec8d373..f9af9017b029 100644
--- a/llvm/test/CodeGen/SystemZ/fp-strict-mul-10.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-strict-mul-10.ll
@@ -11,7 +11,7 @@ define double @f1(double %f1, double %f2, double %acc) #0 {
double %f1, double %f2, double %acc,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negres = fsub double -0.0, %res
+ %negres = fneg double %res
ret double %negres
}
@@ -19,12 +19,12 @@ define double @f2(double %f1, double %f2, double %acc) #0 {
; CHECK-LABEL: f2:
; CHECK: wfnmsdb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub double -0.0, %acc
+ %negacc = fneg double %acc
%res = call double @llvm.experimental.constrained.fma.f64 (
double %f1, double %f2, double %negacc,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negres = fsub double -0.0, %res
+ %negres = fneg double %res
ret double %negres
}
@@ -36,7 +36,7 @@ define float @f3(float %f1, float %f2, float %acc) #0 {
float %f1, float %f2, float %acc,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negres = fsub float -0.0, %res
+ %negres = fneg float %res
ret float %negres
}
@@ -44,12 +44,12 @@ define float @f4(float %f1, float %f2, float %acc) #0 {
; CHECK-LABEL: f4:
; CHECK: wfnmssb %f0, %f0, %f2, %f4
; CHECK: br %r14
- %negacc = fsub float -0.0, %acc
+ %negacc = fneg float %acc
%res = call float @llvm.experimental.constrained.fma.f32 (
float %f1, float %f2, float %negacc,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negres = fsub float -0.0, %res
+ %negres = fneg float %res
ret float %negres
}
diff --git a/llvm/test/CodeGen/SystemZ/vec-abs-05.ll b/llvm/test/CodeGen/SystemZ/vec-abs-05.ll
index 63210f87b94e..800badd106d2 100644
--- a/llvm/test/CodeGen/SystemZ/vec-abs-05.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-abs-05.ll
@@ -20,7 +20,7 @@ define <2 x double> @f2(<2 x double> %val) {
; CHECK: vflndb %v24, %v24
; CHECK: br %r14
%abs = call <2 x double> @llvm.fabs.v2f64(<2 x double> %val)
- %ret = fsub <2 x double> <double -0.0, double -0.0>, %abs
+ %ret = fneg <2 x double> %abs
ret <2 x double> %ret
}
@@ -41,6 +41,6 @@ define double @f4(<2 x double> %val) {
; CHECK: br %r14
%scalar = extractelement <2 x double> %val, i32 0
%abs = call double @llvm.fabs.f64(double %scalar)
- %ret = fsub double -0.0, %abs
+ %ret = fneg double %abs
ret double %ret
}
diff --git a/llvm/test/CodeGen/SystemZ/vec-abs-06.ll b/llvm/test/CodeGen/SystemZ/vec-abs-06.ll
index 8eee1d9d2507..79c93cc09bd4 100644
--- a/llvm/test/CodeGen/SystemZ/vec-abs-06.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-abs-06.ll
@@ -20,8 +20,7 @@ define <4 x float> @f2(<4 x float> %val) {
; CHECK: vflnsb %v24, %v24
; CHECK: br %r14
%abs = call <4 x float> @llvm.fabs.v4f32(<4 x float> %val)
- %ret = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %abs
+ %ret = fneg <4 x float> %abs
ret <4 x float> %ret
}
@@ -42,6 +41,6 @@ define float @f4(<4 x float> %val) {
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
%abs = call float @llvm.fabs.f32(float %scalar)
- %ret = fsub float -0.0, %abs
+ %ret = fneg float %abs
ret float %ret
}
diff --git a/llvm/test/CodeGen/SystemZ/vec-mul-02.ll b/llvm/test/CodeGen/SystemZ/vec-mul-02.ll
index 11a651e49975..a4f6775d3476 100644
--- a/llvm/test/CodeGen/SystemZ/vec-mul-02.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-mul-02.ll
@@ -55,7 +55,7 @@ define <2 x double> @f5(<2 x double> %dummy, <2 x double> %val1,
; CHECK-LABEL: f5:
; CHECK: vfmsdb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <2 x double> <double -0.0, double -0.0>, %val3
+ %negval3 = fneg <2 x double> %val3
%ret = call <2 x double> @llvm.fma.v2f64 (<2 x double> %val1,
<2 x double> %val2,
<2 x double> %negval3)
diff --git a/llvm/test/CodeGen/SystemZ/vec-mul-04.ll b/llvm/test/CodeGen/SystemZ/vec-mul-04.ll
index d96f0b6a745a..ad48d0446e87 100644
--- a/llvm/test/CodeGen/SystemZ/vec-mul-04.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-mul-04.ll
@@ -22,8 +22,7 @@ define <4 x float> @f2(<4 x float> %dummy, <4 x float> %val1,
; CHECK-LABEL: f2:
; CHECK: vfmssb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %val3
+ %negval3 = fneg <4 x float> %val3
%ret = call <4 x float> @llvm.fma.v4f32 (<4 x float> %val1,
<4 x float> %val2,
<4 x float> %negval3)
diff --git a/llvm/test/CodeGen/SystemZ/vec-mul-05.ll b/llvm/test/CodeGen/SystemZ/vec-mul-05.ll
index 90a1f7a7efdf..5435239f2ea6 100644
--- a/llvm/test/CodeGen/SystemZ/vec-mul-05.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-mul-05.ll
@@ -14,7 +14,7 @@ define <2 x double> @f1(<2 x double> %dummy, <2 x double> %val1,
%ret = call <2 x double> @llvm.fma.v2f64 (<2 x double> %val1,
<2 x double> %val2,
<2 x double> %val3)
- %negret = fsub <2 x double> <double -0.0, double -0.0>, %ret
+ %negret = fneg <2 x double> %ret
ret <2 x double> %negret
}
@@ -24,11 +24,11 @@ define <2 x double> @f2(<2 x double> %dummy, <2 x double> %val1,
; CHECK-LABEL: f2:
; CHECK: vfnmsdb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <2 x double> <double -0.0, double -0.0>, %val3
+ %negval3 = fneg <2 x double> %val3
%ret = call <2 x double> @llvm.fma.v2f64 (<2 x double> %val1,
<2 x double> %val2,
<2 x double> %negval3)
- %negret = fsub <2 x double> <double -0.0, double -0.0>, %ret
+ %negret = fneg <2 x double> %ret
ret <2 x double> %negret
}
@@ -41,8 +41,7 @@ define <4 x float> @f3(<4 x float> %dummy, <4 x float> %val1,
%ret = call <4 x float> @llvm.fma.v4f32 (<4 x float> %val1,
<4 x float> %val2,
<4 x float> %val3)
- %negret = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %ret
+ %negret = fneg <4 x float> %ret
ret <4 x float> %negret
}
@@ -52,12 +51,10 @@ define <4 x float> @f4(<4 x float> %dummy, <4 x float> %val1,
; CHECK-LABEL: f4:
; CHECK: vfnmssb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %val3
+ %negval3 = fneg <4 x float> %val3
%ret = call <4 x float> @llvm.fma.v4f32 (<4 x float> %val1,
<4 x float> %val2,
<4 x float> %negval3)
- %negret = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %ret
+ %negret = fneg <4 x float> %ret
ret <4 x float> %negret
}
diff --git a/llvm/test/CodeGen/SystemZ/vec-neg-01.ll b/llvm/test/CodeGen/SystemZ/vec-neg-01.ll
index b1389ce4d6d0..3c1f6e880851 100644
--- a/llvm/test/CodeGen/SystemZ/vec-neg-01.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-neg-01.ll
@@ -43,7 +43,7 @@ define <2 x double> @f5(<2 x double> %dummy, <2 x double> %val) {
; CHECK-LABEL: f5:
; CHECK: vflcdb %v24, %v26
; CHECK: br %r14
- %ret = fsub <2 x double> <double -0.0, double -0.0>, %val
+ %ret = fneg <2 x double> %val
ret <2 x double> %ret
}
@@ -53,6 +53,6 @@ define double @f6(<2 x double> %val) {
; CHECK: wflcdb %f0, %v24
; CHECK: br %r14
%scalar = extractelement <2 x double> %val, i32 0
- %ret = fsub double -0.0, %scalar
+ %ret = fneg double %scalar
ret double %ret
}
diff --git a/llvm/test/CodeGen/SystemZ/vec-neg-02.ll b/llvm/test/CodeGen/SystemZ/vec-neg-02.ll
index 07ce037542fd..f9059decea7c 100644
--- a/llvm/test/CodeGen/SystemZ/vec-neg-02.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-neg-02.ll
@@ -7,8 +7,7 @@ define <4 x float> @f1(<4 x float> %dummy, <4 x float> %val) {
; CHECK-LABEL: f1:
; CHECK: vflcsb %v24, %v26
; CHECK: br %r14
- %ret = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %val
+ %ret = fneg <4 x float> %val
ret <4 x float> %ret
}
@@ -18,6 +17,6 @@ define float @f2(<4 x float> %val) {
; CHECK: wflcsb %f0, %v24
; CHECK: br %r14
%scalar = extractelement <4 x float> %val, i32 0
- %ret = fsub float -0.0, %scalar
+ %ret = fneg float %scalar
ret float %ret
}
diff --git a/llvm/test/CodeGen/SystemZ/vec-strict-mul-02.ll b/llvm/test/CodeGen/SystemZ/vec-strict-mul-02.ll
index fc9c1575952c..d2341c323742 100644
--- a/llvm/test/CodeGen/SystemZ/vec-strict-mul-02.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-strict-mul-02.ll
@@ -25,7 +25,7 @@ define <2 x double> @f5(<2 x double> %dummy, <2 x double> %val1,
; CHECK-LABEL: f5:
; CHECK: vfmsdb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <2 x double> <double -0.0, double -0.0>, %val3
+ %negval3 = fneg <2 x double> %val3
%ret = call <2 x double> @llvm.experimental.constrained.fma.v2f64 (
<2 x double> %val1,
<2 x double> %val2,
diff --git a/llvm/test/CodeGen/SystemZ/vec-strict-mul-04.ll b/llvm/test/CodeGen/SystemZ/vec-strict-mul-04.ll
index 3a4b1448d467..43656b7da734 100644
--- a/llvm/test/CodeGen/SystemZ/vec-strict-mul-04.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-strict-mul-04.ll
@@ -25,8 +25,7 @@ define <4 x float> @f2(<4 x float> %dummy, <4 x float> %val1,
; CHECK-LABEL: f2:
; CHECK: vfmssb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %val3
+ %negval3 = fneg <4 x float> %val3
%ret = call <4 x float> @llvm.experimental.constrained.fma.v4f32 (
<4 x float> %val1,
<4 x float> %val2,
diff --git a/llvm/test/CodeGen/SystemZ/vec-strict-mul-05.ll b/llvm/test/CodeGen/SystemZ/vec-strict-mul-05.ll
index b99378bc7b72..a367cbe0f482 100644
--- a/llvm/test/CodeGen/SystemZ/vec-strict-mul-05.ll
+++ b/llvm/test/CodeGen/SystemZ/vec-strict-mul-05.ll
@@ -17,7 +17,7 @@ define <2 x double> @f1(<2 x double> %dummy, <2 x double> %val1,
<2 x double> %val3,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negret = fsub <2 x double> <double -0.0, double -0.0>, %ret
+ %negret = fneg <2 x double> %ret
ret <2 x double> %negret
}
@@ -27,14 +27,14 @@ define <2 x double> @f2(<2 x double> %dummy, <2 x double> %val1,
; CHECK-LABEL: f2:
; CHECK: vfnmsdb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <2 x double> <double -0.0, double -0.0>, %val3
+ %negval3 = fneg <2 x double> %val3
%ret = call <2 x double> @llvm.experimental.constrained.fma.v2f64 (
<2 x double> %val1,
<2 x double> %val2,
<2 x double> %negval3,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negret = fsub <2 x double> <double -0.0, double -0.0>, %ret
+ %negret = fneg <2 x double> %ret
ret <2 x double> %negret
}
@@ -50,8 +50,7 @@ define <4 x float> @f3(<4 x float> %dummy, <4 x float> %val1,
<4 x float> %val3,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negret = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %ret
+ %negret = fneg <4 x float> %ret
ret <4 x float> %negret
}
@@ -61,16 +60,14 @@ define <4 x float> @f4(<4 x float> %dummy, <4 x float> %val1,
; CHECK-LABEL: f4:
; CHECK: vfnmssb %v24, %v26, %v28, %v30
; CHECK: br %r14
- %negval3 = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %val3
+ %negval3 = fneg <4 x float> %val3
%ret = call <4 x float> @llvm.experimental.constrained.fma.v4f32 (
<4 x float> %val1,
<4 x float> %val2,
<4 x float> %negval3,
metadata !"round.dynamic",
metadata !"fpexcept.strict") #0
- %negret = fsub <4 x float> <float -0.0, float -0.0,
- float -0.0, float -0.0>, %ret
+ %negret = fneg <4 x float> %ret
ret <4 x float> %negret
}
More information about the llvm-commits
mailing list