[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td

Chris Lattner lattner at cs.uiuc.edu
Wed Sep 28 13:58:50 PDT 2005



Changes in directory llvm/lib/Target/PowerPC:

PowerPCInstrInfo.td updated: 1.107 -> 1.108
---
Log message:

Mark associative nodes as associative


---
Diffs of the changes:  (+12 -6)

 PowerPCInstrInfo.td |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.107 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.108
--- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.107	Wed Sep 28 14:01:44 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td	Wed Sep 28 15:58:39 2005
@@ -87,7 +87,8 @@
 // Note: These are hard coded into tblgen.
 //
 class SDNodeProperty;
-def SDNPCommutative : SDNodeProperty;
+def SDNPCommutative : SDNodeProperty;   // X op Y == Y op X
+def SDNPAssociative : SDNodeProperty;   // (X op Y) op Z == X op (Y op Z)
 
 //===----------------------------------------------------------------------===//
 // Selection DAG Node definitions.
@@ -105,12 +106,17 @@
 
 def imm        : SDNode<"ISD::Constant"  , SDTImm     , [], "ConstantSDNode">;
 def vt         : SDNode<"ISD::VALUETYPE" , SDTVT      , [], "VTSDNode">;
-def and        : SDNode<"ISD::AND"       , SDTIntBinOp, [SDNPCommutative]>;
-def or         : SDNode<"ISD::OR"        , SDTIntBinOp, [SDNPCommutative]>;
-def xor        : SDNode<"ISD::XOR"       , SDTIntBinOp, [SDNPCommutative]>;
-def add        : SDNode<"ISD::ADD"       , SDTBinOp   , [SDNPCommutative]>;
+def and        : SDNode<"ISD::AND"       , SDTIntBinOp,
+                        [SDNPCommutative, SDNPAssociative]>;
+def or         : SDNode<"ISD::OR"        , SDTIntBinOp,
+                        [SDNPCommutative, SDNPAssociative]>;
+def xor        : SDNode<"ISD::XOR"       , SDTIntBinOp,
+                        [SDNPCommutative, SDNPAssociative]>;
+def add        : SDNode<"ISD::ADD"       , SDTBinOp   ,
+                        [SDNPCommutative, SDNPAssociative]>;
 def sub        : SDNode<"ISD::SUB"       , SDTBinOp>;
-def mul        : SDNode<"ISD::MUL"       , SDTBinOp   , [SDNPCommutative]>;
+def mul        : SDNode<"ISD::MUL"       , SDTBinOp   ,
+                        [SDNPCommutative, SDNPAssociative]>;
 def sdiv       : SDNode<"ISD::SDIV"      , SDTBinOp>;
 def udiv       : SDNode<"ISD::UDIV"      , SDTIntBinOp>;
 def mulhs      : SDNode<"ISD::MULHS"     , SDTIntBinOp, [SDNPCommutative]>;






More information about the llvm-commits mailing list