[llvm] r345220 - Make fminimum/fmaximum SDNodes commutative and associative

Thomas Lively via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 16:14:59 PDT 2018


Author: tlively
Date: Wed Oct 24 16:14:59 2018
New Revision: 345220

URL: http://llvm.org/viewvc/llvm-project?rev=345220&view=rev
Log:
Make fminimum/fmaximum SDNodes commutative and associative

Reviewers: aheejin, dschuff

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D53680

Modified:
    llvm/trunk/include/llvm/Target/TargetSelectionDAG.td

Modified: llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelectionDAG.td?rev=345220&r1=345219&r2=345220&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetSelectionDAG.td (original)
+++ llvm/trunk/include/llvm/Target/TargetSelectionDAG.td Wed Oct 24 16:14:59 2018
@@ -413,8 +413,10 @@ def fminnum_ieee : SDNode<"ISD::FMINNUM_
                           [SDNPCommutative]>;
 def fmaxnum_ieee  : SDNode<"ISD::FMAXNUM_IEEE", SDTFPBinOp,
                            [SDNPCommutative]>;
-def fminimum   : SDNode<"ISD::FMINIMUM"   , SDTFPBinOp>;
-def fmaximum   : SDNode<"ISD::FMAXIMUM"   , SDTFPBinOp>;
+def fminimum   : SDNode<"ISD::FMINIMUM"   , SDTFPBinOp,
+                        [SDNPCommutative, SDNPAssociative]>;
+def fmaximum   : SDNode<"ISD::FMAXIMUM"   , SDTFPBinOp,
+                        [SDNPCommutative, SDNPAssociative]>;
 def fgetsign   : SDNode<"ISD::FGETSIGN"   , SDTFPToIntOp>;
 def fcanonicalize : SDNode<"ISD::FCANONICALIZE", SDTFPUnaryOp>;
 def fneg       : SDNode<"ISD::FNEG"       , SDTFPUnaryOp>;




More information about the llvm-commits mailing list