[llvm-commits] [llvm] r92506 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td
Dan Gohman
gohman at apple.com
Mon Jan 4 12:51:05 PST 2010
Author: djg
Date: Mon Jan 4 14:51:05 2010
New Revision: 92506
URL: http://llvm.org/viewvc/llvm-project?rev=92506&view=rev
Log:
Add SDNPCommutative and SDNPAssociative to several X86 target nodes.
This lets isel fold loads into them in more cases.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=92506&r1=92505&r2=92506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Mon Jan 4 14:51:05 2010
@@ -160,15 +160,21 @@
def X86tcret : SDNode<"X86ISD::TC_RETURN", SDT_X86TCRET,
[SDNPHasChain, SDNPOptInFlag]>;
-def X86add_flag : SDNode<"X86ISD::ADD", SDTBinaryArithWithFlags>;
+def X86add_flag : SDNode<"X86ISD::ADD", SDTBinaryArithWithFlags,
+ [SDNPCommutative, SDNPAssociative]>;
def X86sub_flag : SDNode<"X86ISD::SUB", SDTBinaryArithWithFlags>;
-def X86smul_flag : SDNode<"X86ISD::SMUL", SDTBinaryArithWithFlags>;
-def X86umul_flag : SDNode<"X86ISD::UMUL", SDTUnaryArithWithFlags>;
+def X86smul_flag : SDNode<"X86ISD::SMUL", SDTBinaryArithWithFlags,
+ [SDNPCommutative, SDNPAssociative]>;
+def X86umul_flag : SDNode<"X86ISD::UMUL", SDTUnaryArithWithFlags,
+ [SDNPCommutative, SDNPAssociative]>;
def X86inc_flag : SDNode<"X86ISD::INC", SDTUnaryArithWithFlags>;
def X86dec_flag : SDNode<"X86ISD::DEC", SDTUnaryArithWithFlags>;
-def X86or_flag : SDNode<"X86ISD::OR", SDTBinaryArithWithFlags>;
-def X86xor_flag : SDNode<"X86ISD::XOR", SDTBinaryArithWithFlags>;
-def X86and_flag : SDNode<"X86ISD::AND", SDTBinaryArithWithFlags>;
+def X86or_flag : SDNode<"X86ISD::OR", SDTBinaryArithWithFlags,
+ [SDNPCommutative, SDNPAssociative]>;
+def X86xor_flag : SDNode<"X86ISD::XOR", SDTBinaryArithWithFlags,
+ [SDNPCommutative, SDNPAssociative]>;
+def X86and_flag : SDNode<"X86ISD::AND", SDTBinaryArithWithFlags,
+ [SDNPCommutative, SDNPAssociative]>;
def X86mul_imm : SDNode<"X86ISD::MUL_IMM", SDTIntBinOp>;
More information about the llvm-commits
mailing list