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

Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.ll"

This reverts commit 3d2ee0053aa2576fd19cd169798c496199f0a29b.

llvm-svn: 363312
This commit is contained in:
Cameron McInally 2019-06-13 19:25:00 +00:00
parent e915bd5931
commit e2d65ddea9

View File

@ -428,31 +428,6 @@ entry:
ret <2 x double> %12
}
define <2 x double> @combine_scalar_mask_fnmsub_f32_unary_fneg(<2 x double> %a, i8 zeroext %k, <2 x double> %b, <2 x double> %c) {
; CHECK-LABEL: combine_scalar_mask_fnmsub_f32_unary_fneg:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: kmovw %edi, %k1 # encoding: [0xc5,0xf8,0x92,0xcf]
; CHECK-NEXT: vfnmsub213ss %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0x75,0x09,0xaf,0xc2]
; CHECK-NEXT: # xmm0 = -(xmm1 * xmm0) - xmm2
; CHECK-NEXT: retq # encoding: [0xc3]
entry:
%0 = bitcast <2 x double> %a to <4 x float>
%1 = bitcast <2 x double> %b to <4 x float>
%2 = bitcast <2 x double> %c to <4 x float>
%3 = extractelement <4 x float> %0, i64 0
%4 = extractelement <4 x float> %1, i64 0
%5 = extractelement <4 x float> %2, i64 0
%sub = fneg fast float %5
%6 = fmul fast float %4, %3
%7 = fsub fast float %sub, %6
%8 = bitcast i8 %k to <8 x i1>
%9 = extractelement <8 x i1> %8, i64 0
%10 = select i1 %9, float %7, float %3
%11 = insertelement <4 x float> %0, float %10, i64 0
%12 = bitcast <4 x float> %11 to <2 x double>
ret <2 x double> %12
}
define <2 x double> @combine_scalar_mask_fnmsub_f64(<2 x double> %a, i8 zeroext %k, <2 x double> %b, <2 x double> %c) {
; CHECK-LABEL: combine_scalar_mask_fnmsub_f64:
; CHECK: # %bb.0: # %entry
@ -474,27 +449,6 @@ entry:
ret <2 x double> %8
}
define <2 x double> @combine_scalar_mask_fnmsub_f64_unary_fneg(<2 x double> %a, i8 zeroext %k, <2 x double> %b, <2 x double> %c) {
; CHECK-LABEL: combine_scalar_mask_fnmsub_f64_unary_fneg:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: kmovw %edi, %k1 # encoding: [0xc5,0xf8,0x92,0xcf]
; CHECK-NEXT: vfnmsub213sd %xmm2, %xmm1, %xmm0 {%k1} # encoding: [0x62,0xf2,0xf5,0x09,0xaf,0xc2]
; CHECK-NEXT: # xmm0 = -(xmm1 * xmm0) - xmm2
; CHECK-NEXT: retq # encoding: [0xc3]
entry:
%0 = extractelement <2 x double> %a, i64 0
%1 = extractelement <2 x double> %b, i64 0
%2 = extractelement <2 x double> %c, i64 0
%sub = fneg fast double %2
%3 = fmul fast double %1, %0
%4 = fsub fast double %sub, %3
%5 = bitcast i8 %k to <8 x i1>
%6 = extractelement <8 x i1> %5, i64 0
%7 = select i1 %6, double %4, double %0
%8 = insertelement <2 x double> %a, double %7, i64 0
ret <2 x double> %8
}
define <2 x double> @combine_scalar_maskz_fnmsub_32(i8 zeroext %k, <2 x double> %a, <2 x double> %b, <2 x double> %c) {
; CHECK-LABEL: combine_scalar_maskz_fnmsub_32:
; CHECK: # %bb.0: # %entry
@ -520,8 +474,8 @@ entry:
ret <2 x double> %12
}
define <2 x double> @combine_scalar_maskz_fnmsub_64_unary_fneg(i8 zeroext %k, <2 x double> %a, <2 x double> %b, <2 x double> %c) {
; CHECK-LABEL: combine_scalar_maskz_fnmsub_64_unary_fneg:
define <2 x double> @combine_scalar_maskz_fnmsub_64(i8 zeroext %k, <2 x double> %a, <2 x double> %b, <2 x double> %c) {
; CHECK-LABEL: combine_scalar_maskz_fnmsub_64:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: kmovw %edi, %k1 # encoding: [0xc5,0xf8,0x92,0xcf]
; CHECK-NEXT: vfnmsub213sd %xmm2, %xmm1, %xmm0 {%k1} {z} # encoding: [0x62,0xf2,0xf5,0x89,0xaf,0xc2]
@ -531,7 +485,7 @@ entry:
%0 = extractelement <2 x double> %a, i64 0
%1 = extractelement <2 x double> %b, i64 0
%2 = extractelement <2 x double> %c, i64 0
%sub = fneg fast double %2
%sub = fsub fast double -0.000000e+00, %2
%3 = fmul fast double %1, %0
%4 = fsub fast double %sub, %3
%5 = bitcast i8 %k to <8 x i1>
@ -567,32 +521,6 @@ entry:
ret <2 x double> %12
}
define <2 x double> @combine_scalar_mask3_fnmsub_32_unary_fneg(<2 x double> %a, <2 x double> %b, <2 x double> %c, i8 zeroext %k) {
; CHECK-LABEL: combine_scalar_mask3_fnmsub_32_unary_fneg:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: kmovw %edi, %k1 # encoding: [0xc5,0xf8,0x92,0xcf]
; CHECK-NEXT: vfnmsub231ss %xmm0, %xmm1, %xmm2 {%k1} # encoding: [0x62,0xf2,0x75,0x09,0xbf,0xd0]
; CHECK-NEXT: # xmm2 = -(xmm1 * xmm0) - xmm2
; CHECK-NEXT: vmovaps %xmm2, %xmm0 # encoding: [0xc5,0xf8,0x28,0xc2]
; CHECK-NEXT: retq # encoding: [0xc3]
entry:
%0 = bitcast <2 x double> %a to <4 x float>
%1 = bitcast <2 x double> %b to <4 x float>
%2 = bitcast <2 x double> %c to <4 x float>
%3 = extractelement <4 x float> %0, i64 0
%4 = extractelement <4 x float> %1, i64 0
%5 = extractelement <4 x float> %2, i64 0
%sub = fneg fast float %5
%6 = fmul fast float %4, %3
%7 = fsub fast float %sub, %6
%8 = bitcast i8 %k to <8 x i1>
%9 = extractelement <8 x i1> %8, i64 0
%10 = select i1 %9, float %7, float %5
%11 = insertelement <4 x float> %2, float %10, i64 0
%12 = bitcast <4 x float> %11 to <2 x double>
ret <2 x double> %12
}
define <2 x double> @combine_scalar_mask3_fnmsub_64(<2 x double> %a, <2 x double> %b, <2 x double> %c, i8 zeroext %k) {
; CHECK-LABEL: combine_scalar_mask3_fnmsub_64:
; CHECK: # %bb.0: # %entry
@ -614,25 +542,3 @@ entry:
%8 = insertelement <2 x double> %c, double %7, i64 0
ret <2 x double> %8
}
define <2 x double> @combine_scalar_mask3_fnmsub_64_unary_fneg(<2 x double> %a, <2 x double> %b, <2 x double> %c, i8 zeroext %k) {
; CHECK-LABEL: combine_scalar_mask3_fnmsub_64_unary_fneg:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: kmovw %edi, %k1 # encoding: [0xc5,0xf8,0x92,0xcf]
; CHECK-NEXT: vfnmsub231sd %xmm0, %xmm1, %xmm2 {%k1} # encoding: [0x62,0xf2,0xf5,0x09,0xbf,0xd0]
; CHECK-NEXT: # xmm2 = -(xmm1 * xmm0) - xmm2
; CHECK-NEXT: vmovapd %xmm2, %xmm0 # encoding: [0xc5,0xf9,0x28,0xc2]
; CHECK-NEXT: retq # encoding: [0xc3]
entry:
%0 = extractelement <2 x double> %a, i64 0
%1 = extractelement <2 x double> %b, i64 0
%2 = extractelement <2 x double> %c, i64 0
%sub = fneg fast double %2
%3 = fmul fast double %1, %0
%4 = fsub fast double %sub, %3
%5 = bitcast i8 %k to <8 x i1>
%6 = extractelement <8 x i1> %5, i64 0
%7 = select i1 %6, double %4, double %2
%8 = insertelement <2 x double> %c, double %7, i64 0
ret <2 x double> %8
}