1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[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.
This commit is contained in:
Ulrich Weigand 2019-11-20 19:07:03 +01:00
parent 30aba84435
commit f3ab4849fb
22 changed files with 88 additions and 98 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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",

View File

@ -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",

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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)

View File

@ -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)

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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,

View File

@ -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,

View File

@ -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
}