[PATCH] D48057: easing the constraint for isNegatibleForFree and GetNegatedExpression
Michael Berg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 14 13:58:41 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334769: easing the constraint for isNegatibleForFree and GetNegatedExpression (authored by mcberg2017, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D48057?vs=151374&id=151421#toc
Repository:
rL LLVM
https://reviews.llvm.org/D48057
Files:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/test/CodeGen/ARM/fnmul.ll
Index: llvm/trunk/test/CodeGen/ARM/fnmul.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/fnmul.ll
+++ llvm/trunk/test/CodeGen/ARM/fnmul.ll
@@ -1,17 +1,15 @@
-; RUN: llc -mtriple=arm-eabi -mattr=+v6,+vfp2 %s -o - | FileCheck %s
-
-; RUN: llc -mtriple=arm-eabi -mattr=+v6,+vfp2 -enable-sign-dependent-rounding-fp-math %s -o - \
-; RUN: | FileCheck %s -check-prefix CHECK-ROUNDING
-
+; RUN: llc -mtriple=arm-eabi -mattr=+v6,+vfp2 %s -o - | FileCheck %s -check-prefix STRICT
+; RUN: llc -mtriple=arm-eabi -mattr=+v6,+vfp2 -enable-unsafe-fp-math %s -o - | FileCheck %s -check-prefix UNSAFE
define double @t1(double %a, double %b) {
+; STRICT: vnmul.f64
+;
+; UNSAFE: vnmul.f64
entry:
%tmp2 = fsub double -0.000000e+00, %a ; <double> [#uses=1]
%tmp4 = fmul double %tmp2, %b ; <double> [#uses=1]
ret double %tmp4
}
-; CHECK: vnmul.f64
-; CHECK-ROUNDING: vmul.f64
Index: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -729,8 +729,6 @@
case ISD::FMUL:
case ISD::FDIV:
- if (Options->HonorSignDependentRoundingFPMath()) return 0;
-
// fold (fneg (fmul X, Y)) -> (fmul (fneg X), Y) or (fmul X, (fneg Y))
if (char V = isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI,
Options, Depth + 1))
@@ -792,8 +790,6 @@
case ISD::FMUL:
case ISD::FDIV:
- assert(!Options.HonorSignDependentRoundingFPMath());
-
// fold (fneg (fmul X, Y)) -> (fmul (fneg X), Y)
if (isNegatibleForFree(Op.getOperand(0), LegalOperations,
DAG.getTargetLoweringInfo(), &Options, Depth+1))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48057.151421.patch
Type: text/x-patch
Size: 1891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/c5a85185/attachment.bin>
More information about the llvm-commits
mailing list