diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-28 20:58:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-28 20:58:39 +0000 |
commit | a5cac6f6eb939b033c020cc59499756d2b95b349 (patch) | |
tree | d5686115471c9e209164e552d0073d03a3dc6b20 | |
parent | 7cf2fe6c48aa14cd2d323d3cc81a2b51bb548863 (diff) | |
download | external_llvm-a5cac6f6eb939b033c020cc59499756d2b95b349.zip external_llvm-a5cac6f6eb939b033c020cc59499756d2b95b349.tar.gz external_llvm-a5cac6f6eb939b033c020cc59499756d2b95b349.tar.bz2 |
Mark associative nodes as associative
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23503 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.td | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 94f504a..9467f17 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -87,7 +87,8 @@ def SDTExtInreg : SDTypeProfile<1, 2, [ // sext_inreg // 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 node; 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]>; |