mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-07 19:19:26 +00:00
add the integer truncate/extension operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0b61677ae0
commit
444215dddc
@ -78,6 +78,12 @@ def SDTFPBinOp : SDTypeProfile<1, 2, [ // fadd, fmul, etc.
|
||||
def SDTIntUnaryOp : SDTypeProfile<1, 1, [ // ctlz
|
||||
SDTCisSameAs<0, 1>, SDTCisInt<0>
|
||||
]>;
|
||||
def SDTIntExtendOp : SDTypeProfile<1, 1, [ // sext, zext, anyext
|
||||
SDTCisInt<0>, SDTCisInt<1>, SDTCisOpSmallerThanOp<1, 0>
|
||||
]>;
|
||||
def SDTIntTruncOp : SDTypeProfile<1, 1, [ // trunc
|
||||
SDTCisInt<0>, SDTCisInt<1>, SDTCisOpSmallerThanOp<0, 1>
|
||||
]>;
|
||||
def SDTFPUnaryOp : SDTypeProfile<1, 1, [ // fneg, fsqrt, etc
|
||||
SDTCisSameAs<0, 1>, SDTCisFP<0>
|
||||
]>;
|
||||
@ -137,6 +143,14 @@ def or : SDNode<"ISD::OR" , SDTIntBinOp,
|
||||
[SDNPCommutative, SDNPAssociative]>;
|
||||
def xor : SDNode<"ISD::XOR" , SDTIntBinOp,
|
||||
[SDNPCommutative, SDNPAssociative]>;
|
||||
|
||||
def sext_inreg : SDNode<"ISD::SIGN_EXTEND_INREG", SDTExtInreg>;
|
||||
def ctlz : SDNode<"ISD::CTLZ" , SDTIntUnaryOp>;
|
||||
def sext : SDNode<"ISD::SIGN_EXTEND", SDTIntExtendOp>;
|
||||
def zext : SDNode<"ISD::ZERO_EXTEND", SDTIntExtendOp>;
|
||||
def anyext : SDNode<"ISD::ANY_EXTEND" , SDTIntExtendOp>;
|
||||
def trunc : SDNode<"ISD::TRUNCATE" , SDTIntTruncOp>;
|
||||
|
||||
def fadd : SDNode<"ISD::FADD" , SDTFPBinOp, [SDNPCommutative]>;
|
||||
def fsub : SDNode<"ISD::FSUB" , SDTFPBinOp>;
|
||||
def fmul : SDNode<"ISD::FMUL" , SDTFPBinOp, [SDNPCommutative]>;
|
||||
@ -149,9 +163,6 @@ def fsqrt : SDNode<"ISD::FSQRT" , SDTFPUnaryOp>;
|
||||
def fround : SDNode<"ISD::FP_ROUND" , SDTFPRoundOp>;
|
||||
def fextend : SDNode<"ISD::FP_EXTEND" , SDTFPExtendOp>;
|
||||
|
||||
def sext_inreg : SDNode<"ISD::SIGN_EXTEND_INREG", SDTExtInreg>;
|
||||
def ctlz : SDNode<"ISD::CTLZ" , SDTIntUnaryOp>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Selection DAG Node Transformation Functions.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user