summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/fneg.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstCombine/fneg.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/fneg.ll27
1 files changed, 9 insertions, 18 deletions
diff --git a/llvm/test/Transforms/InstCombine/fneg.ll b/llvm/test/Transforms/InstCombine/fneg.ll
index 69ad3541641..df1d5f570db 100644
--- a/llvm/test/Transforms/InstCombine/fneg.ll
+++ b/llvm/test/Transforms/InstCombine/fneg.ll
@@ -7,8 +7,7 @@ declare void @use(float)
define float @fmul_fneg(float %x) {
; CHECK-LABEL: @fmul_fneg(
-; CHECK-NEXT: [[M:%.*]] = fmul float [[X:%.*]], 4.200000e+01
-; CHECK-NEXT: [[R:%.*]] = fsub float -0.000000e+00, [[M]]
+; CHECK-NEXT: [[R:%.*]] = fmul float [[X:%.*]], -4.200000e+01
; CHECK-NEXT: ret float [[R]]
;
%m = fmul float %x, 42.0
@@ -20,8 +19,7 @@ define float @fmul_fneg(float %x) {
define float @fmul_fneg_fmf(float %x) {
; CHECK-LABEL: @fmul_fneg_fmf(
-; CHECK-NEXT: [[M:%.*]] = fmul float [[X:%.*]], 4.200000e+01
-; CHECK-NEXT: [[R:%.*]] = fsub reassoc nsz float -0.000000e+00, [[M]]
+; CHECK-NEXT: [[R:%.*]] = fmul reassoc nsz float [[X:%.*]], -4.200000e+01
; CHECK-NEXT: ret float [[R]]
;
%m = fmul float %x, 42.0
@@ -48,8 +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: [[M:%.*]] = fmul <4 x double> [[X:%.*]], <double 4.200000e+01, double 0xFF80000000000000, double 0x7FF0000000000000, double undef>
-; CHECK-NEXT: [[R:%.*]] = fsub <4 x double> <double -0.000000e+00, double -0.000000e+00, double -0.000000e+00, double -0.000000e+00>, [[M]]
+; CHECK-NEXT: [[R:%.*]] = fmul <4 x double> [[X:%.*]], <double -4.200000e+01, double 0x7F80000000000000, double 0xFFF0000000000000, double 0x7FF8000000000000>
; CHECK-NEXT: ret <4 x double> [[R]]
;
%m = fmul <4 x double> %x, <double 42.0, double 0x7FF80000000000000, double 0x7FF0000000000000, double undef>
@@ -61,8 +58,7 @@ define <4 x double> @fmul_fneg_vec(<4 x double> %x) {
define float @fdiv_op1_constant_fneg(float %x) {
; CHECK-LABEL: @fdiv_op1_constant_fneg(
-; CHECK-NEXT: [[D:%.*]] = fdiv float [[X:%.*]], -4.200000e+01
-; CHECK-NEXT: [[R:%.*]] = fsub float -0.000000e+00, [[D]]
+; CHECK-NEXT: [[R:%.*]] = fdiv float [[X:%.*]], 4.200000e+01
; CHECK-NEXT: ret float [[R]]
;
%d = fdiv float %x, -42.0
@@ -74,8 +70,7 @@ define float @fdiv_op1_constant_fneg(float %x) {
define float @fdiv_op1_constant_fneg_fmf(float %x) {
; CHECK-LABEL: @fdiv_op1_constant_fneg_fmf(
-; CHECK-NEXT: [[D:%.*]] = fdiv float [[X:%.*]], -4.200000e+01
-; CHECK-NEXT: [[R:%.*]] = fsub nnan float -0.000000e+00, [[D]]
+; CHECK-NEXT: [[R:%.*]] = fdiv nnan float [[X:%.*]], 4.200000e+01
; CHECK-NEXT: ret float [[R]]
;
%d = fdiv float %x, -42.0
@@ -102,8 +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: [[D:%.*]] = fdiv <4 x double> [[X:%.*]], <double -4.200000e+01, double 0xFFF800000ABCD000, double 0xFFF0000000000000, double undef>
-; CHECK-NEXT: [[R:%.*]] = fsub <4 x double> <double -0.000000e+00, double -0.000000e+00, double -0.000000e+00, double -0.000000e+00>, [[D]]
+; CHECK-NEXT: [[R:%.*]] = fdiv <4 x double> [[X:%.*]], <double 4.200000e+01, double 0x7FF800000ABCD000, double 0x7FF0000000000000, double 0x7FF8000000000000>
; CHECK-NEXT: ret <4 x double> [[R]]
;
%d = fdiv <4 x double> %x, <double -42.0, double 0xFFF800000ABCD000, double 0xFFF0000000000000, double undef>
@@ -115,8 +109,7 @@ define <4 x double> @fdiv_op1_constant_fneg_vec(<4 x double> %x) {
define float @fdiv_op0_constant_fneg(float %x) {
; CHECK-LABEL: @fdiv_op0_constant_fneg(
-; CHECK-NEXT: [[D:%.*]] = fdiv float 4.200000e+01, [[X:%.*]]
-; CHECK-NEXT: [[R:%.*]] = fsub float -0.000000e+00, [[D]]
+; CHECK-NEXT: [[R:%.*]] = fdiv float -4.200000e+01, [[X:%.*]]
; CHECK-NEXT: ret float [[R]]
;
%d = fdiv float 42.0, %x
@@ -128,8 +121,7 @@ define float @fdiv_op0_constant_fneg(float %x) {
define float @fdiv_op0_constant_fneg_fmf(float %x) {
; CHECK-LABEL: @fdiv_op0_constant_fneg_fmf(
-; CHECK-NEXT: [[D:%.*]] = fdiv float 4.200000e+01, [[X:%.*]]
-; CHECK-NEXT: [[R:%.*]] = fsub fast float -0.000000e+00, [[D]]
+; CHECK-NEXT: [[R:%.*]] = fdiv fast float -4.200000e+01, [[X:%.*]]
; CHECK-NEXT: ret float [[R]]
;
%d = fdiv float 42.0, %x
@@ -156,8 +148,7 @@ 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: [[D:%.*]] = fdiv <4 x double> <double -4.200000e+01, double 0xFF80000000000000, double 0xFFF0000000000000, double undef>, [[X:%.*]]
-; CHECK-NEXT: [[R:%.*]] = fsub <4 x double> <double -0.000000e+00, double -0.000000e+00, double -0.000000e+00, double -0.000000e+00>, [[D]]
+; CHECK-NEXT: [[R:%.*]] = fdiv <4 x double> <double 4.200000e+01, double 0x7F80000000000000, double 0x7FF0000000000000, double 0x7FF8000000000000>, [[X:%.*]]
; CHECK-NEXT: ret <4 x double> [[R]]
;
%d = fdiv <4 x double> <double -42.0, double 0x7FF80000000000000, double 0xFFF0000000000000, double undef>, %x
OpenPOWER on IntegriCloud