diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-17 20:42:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-17 20:42:29 +0000 |
commit | 0b218434cc94c47e40af9b544676d48d751e2d52 (patch) | |
tree | 253027727c7f074a2bdc4f26c0078e569b98da88 | |
parent | b575baf57d49bc53883544b4585e25ae4585ab3f (diff) |
add truncstore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24787 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/TargetSelectionDAG.td | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Target/TargetSelectionDAG.td b/lib/Target/TargetSelectionDAG.td index 0da445d5d1..953a0874e8 100644 --- a/lib/Target/TargetSelectionDAG.td +++ b/lib/Target/TargetSelectionDAG.td @@ -135,8 +135,7 @@ def SDTBrCond : SDTypeProfile<0, 2, [ // brcond SDTCisInt<0>, SDTCisVT<1, OtherVT> ]>; -def SDTRet : SDTypeProfile<0, 0, [ // ret -]>; +def SDTRet : SDTypeProfile<0, 0, []>; // ret def SDTWritePort : SDTypeProfile<0, 2, [ // writeport SDTCisInt<0>, SDTCisInt<1> @@ -153,6 +152,9 @@ def SDTStore : SDTypeProfile<0, 2, [ // store def SDTIntExtLoad : SDTypeProfile<1, 3, [ // sextload, zextload, extload SDTCisInt<0>, SDTCisPtrTy<1>, SDTCisVT<2, OtherVT>, SDTCisVT<3, OtherVT> ]>; +def SDTTruncStore : SDTypeProfile<0, 4, [ // truncstore + SDTCisInt<0>, SDTCisPtrTy<1>, SDTCisVT<2, OtherVT>, SDTCisVT<3, OtherVT> +]>; //===----------------------------------------------------------------------===// @@ -262,6 +264,7 @@ def store : SDNode<"ISD::STORE" , SDTStore, [SDNPHasChain]>; def sextld : SDNode<"ISD::SEXTLOAD" , SDTIntExtLoad, [SDNPHasChain]>; def zextld : SDNode<"ISD::ZEXTLOAD" , SDTIntExtLoad, [SDNPHasChain]>; def extld : SDNode<"ISD::EXTLOAD" , SDTIntExtLoad, [SDNPHasChain]>; +def truncst : SDNode<"ISD::TRUNCSTORE" , SDTTruncStore, [SDNPHasChain]>; //===----------------------------------------------------------------------===// // Selection DAG Condition Codes @@ -329,13 +332,16 @@ def vtFP : PatLeaf<(vt), [{ return MVT::isFloatingPoint(N->getVT()); }]>; def not : PatFrag<(ops node:$in), (xor node:$in, immAllOnes)>; def ineg : PatFrag<(ops node:$in), (sub 0, node:$in)>; -// extending load fragments. +// extending load & truncstore fragments. def sextload : PatFrag<(ops node:$ptr, node:$vt), (sextld node:$ptr, srcvalue:$dummy, node:$vt)>; def zextload : PatFrag<(ops node:$ptr, node:$vt), (zextld node:$ptr, srcvalue:$dummy, node:$vt)>; def extload : PatFrag<(ops node:$ptr, node:$vt), (extld node:$ptr, srcvalue:$dummy, node:$vt)>; +def truncstore : PatFrag<(ops node:$val, node:$ptr, node:$vt), + (truncst node:$val, node:$ptr, srcvalue:$dummy, + node:$vt)>; // setcc convenience fragments. def setoeq : PatFrag<(ops node:$lhs, node:$rhs), |