OSDN Git Service

Make fminimum/fmaximum SDNodes commutative and associative
authorThomas Lively <tlively@google.com>
Wed, 24 Oct 2018 23:14:59 +0000 (23:14 +0000)
committerThomas Lively <tlively@google.com>
Wed, 24 Oct 2018 23:14:59 +0000 (23:14 +0000)
Reviewers: aheejin, dschuff

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345220 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetSelectionDAG.td

index b1558b0..dfc3ce8 100644 (file)
@@ -413,8 +413,10 @@ def fminnum_ieee : SDNode<"ISD::FMINNUM_IEEE", SDTFPBinOp,
                           [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>;