diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/fneg.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/fneg.ll | 53 |
1 files changed, 3 insertions, 50 deletions
diff --git a/llvm/test/Transforms/InstCombine/fneg.ll b/llvm/test/Transforms/InstCombine/fneg.ll index 84cc981566f..889bb022541 100644 --- a/llvm/test/Transforms/InstCombine/fneg.ll +++ b/llvm/test/Transforms/InstCombine/fneg.ll @@ -46,7 +46,7 @@ define float @fmul_fneg_extra_use(float %x) { define <4 x double> @fmul_fneg_vec(<4 x double> %x) { ; CHECK-LABEL: @fmul_fneg_vec( -; CHECK-NEXT: [[R:%.*]] = fmul <4 x double> [[X:%.*]], <double -4.200000e+01, double 0x7F80000000000000, double 0xFFF0000000000000, double 0x7FF8000000000000> +; CHECK-NEXT: [[R:%.*]] = fmul <4 x double> [[X:%.*]], <double -4.200000e+01, double 0x7F80000000000000, double 0xFFF0000000000000, double undef> ; CHECK-NEXT: ret <4 x double> [[R]] ; %m = fmul <4 x double> %x, <double 42.0, double 0x7FF80000000000000, double 0x7FF0000000000000, double undef> @@ -97,7 +97,7 @@ define float @fdiv_op1_constant_fneg_extra_use(float %x) { define <4 x double> @fdiv_op1_constant_fneg_vec(<4 x double> %x) { ; CHECK-LABEL: @fdiv_op1_constant_fneg_vec( -; CHECK-NEXT: [[R:%.*]] = fdiv <4 x double> [[X:%.*]], <double 4.200000e+01, double 0x7FF800000ABCD000, double 0x7FF0000000000000, double 0x7FF8000000000000> +; CHECK-NEXT: [[R:%.*]] = fdiv <4 x double> [[X:%.*]], <double 4.200000e+01, double 0x7FF800000ABCD000, double 0x7FF0000000000000, double undef> ; CHECK-NEXT: ret <4 x double> [[R]] ; %d = fdiv <4 x double> %x, <double -42.0, double 0xFFF800000ABCD000, double 0xFFF0000000000000, double undef> @@ -148,57 +148,10 @@ define float @fdiv_op0_constant_fneg_extra_use(float %x) { define <4 x double> @fdiv_op0_constant_fneg_vec(<4 x double> %x) { ; CHECK-LABEL: @fdiv_op0_constant_fneg_vec( -; CHECK-NEXT: [[R:%.*]] = fdiv <4 x double> <double 4.200000e+01, double 0x7F80000000000000, double 0x7FF0000000000000, double 0x7FF8000000000000>, [[X:%.*]] +; CHECK-NEXT: [[R:%.*]] = fdiv <4 x double> <double 4.200000e+01, double 0x7F80000000000000, double 0x7FF0000000000000, double undef>, [[X:%.*]] ; CHECK-NEXT: ret <4 x double> [[R]] ; %d = fdiv <4 x double> <double -42.0, double 0x7FF80000000000000, double 0xFFF0000000000000, double undef>, %x %r = fsub <4 x double> <double -0.0, double -0.0, double -0.0, double -0.0>, %d ret <4 x double> %r } - -; Actual fneg instructions. - -define float @fneg_constant() { -; CHECK-LABEL: @fneg_constant( -; CHECK-NEXT: [[R:%.*]] = fneg float -0.000000e+00 -; CHECK-NEXT: ret float [[R]] -; - %r = fneg float -0.0 - ret float %r -} - -define float @fneg_undef() { -; CHECK-LABEL: @fneg_undef( -; CHECK-NEXT: [[R:%.*]] = fneg float undef -; CHECK-NEXT: ret float [[R]] -; - %r = fneg float undef - ret float %r -} - -define <4 x float> @fneg_constant_elts_v4f32() { -; CHECK-LABEL: @fneg_constant_elts_v4f32( -; CHECK-NEXT: [[R:%.*]] = fneg <4 x float> <float -0.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00> -; CHECK-NEXT: ret <4 x float> [[R]] -; - %r = fneg <4 x float> <float -0.0, float 0.0, float -1.0, float 1.0> - ret <4 x float> %r -} - -define <4 x float> @fneg_constant_undef_elts_v4f32() { -; CHECK-LABEL: @fneg_constant_undef_elts_v4f32( -; CHECK-NEXT: [[R:%.*]] = fneg <4 x float> <float -0.000000e+00, float undef, float undef, float 1.000000e+00> -; CHECK-NEXT: ret <4 x float> [[R]] -; - %r = fneg <4 x float> <float -0.0, float undef, float undef, float 1.0> - ret <4 x float> %r -} - -define <4 x float> @fneg_constant_all_undef_elts_v4f32() { -; CHECK-LABEL: @fneg_constant_all_undef_elts_v4f32( -; CHECK-NEXT: [[R:%.*]] = fneg <4 x float> undef -; CHECK-NEXT: ret <4 x float> [[R]] -; - %r = fneg <4 x float> <float undef, float undef, float undef, float undef> - ret <4 x float> %r -} |

