mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 02:29:51 +00:00
Don't call tablegen'ed Predicate_* functions in the ARM target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ae231a06c
commit
00d3dda86f
@ -118,6 +118,16 @@ public:
|
||||
bool SelectT2AddrModeSoReg(SDNode *Op, SDValue N, SDValue &Base,
|
||||
SDValue &OffReg, SDValue &ShImm);
|
||||
|
||||
inline bool Pred_so_imm(SDNode *inN) const {
|
||||
ConstantSDNode *N = cast<ConstantSDNode>(inN);
|
||||
return ARM_AM::getSOImmVal(N->getZExtValue()) != -1;
|
||||
}
|
||||
|
||||
inline bool Pred_t2_so_imm(SDNode *inN) const {
|
||||
ConstantSDNode *N = cast<ConstantSDNode>(inN);
|
||||
return ARM_AM::getT2SOImmVal(N->getZExtValue()) != -1;
|
||||
}
|
||||
|
||||
// Include the pieces autogenerated from the target description.
|
||||
#include "ARMGenDAGISel.inc"
|
||||
|
||||
@ -1686,7 +1696,7 @@ SelectT2CMOVSoImmOp(SDNode *N, SDValue FalseVal, SDValue TrueVal,
|
||||
if (!T)
|
||||
return 0;
|
||||
|
||||
if (Predicate_t2_so_imm(TrueVal.getNode())) {
|
||||
if (Pred_t2_so_imm(TrueVal.getNode())) {
|
||||
SDValue True = CurDAG->getTargetConstant(T->getZExtValue(), MVT::i32);
|
||||
SDValue CC = CurDAG->getTargetConstant(CCVal, MVT::i32);
|
||||
SDValue Ops[] = { FalseVal, True, CC, CCR, InFlag };
|
||||
@ -1703,7 +1713,7 @@ SelectARMCMOVSoImmOp(SDNode *N, SDValue FalseVal, SDValue TrueVal,
|
||||
if (!T)
|
||||
return 0;
|
||||
|
||||
if (Predicate_so_imm(TrueVal.getNode())) {
|
||||
if (Pred_so_imm(TrueVal.getNode())) {
|
||||
SDValue True = CurDAG->getTargetConstant(T->getZExtValue(), MVT::i32);
|
||||
SDValue CC = CurDAG->getTargetConstant(CCVal, MVT::i32);
|
||||
SDValue Ops[] = { FalseVal, True, CC, CCR, InFlag };
|
||||
@ -1751,7 +1761,7 @@ SDNode *ARMDAGToDAGISel::SelectCMOVOp(SDNode *N) {
|
||||
}
|
||||
|
||||
// Pattern: (ARMcmov:i32 GPR:i32:$false,
|
||||
// (imm:i32)<<P:Predicate_so_imm>>:$true,
|
||||
// (imm:i32)<<P:Pred_so_imm>>:$true,
|
||||
// (imm:i32):$cc)
|
||||
// Emits: (MOVCCi:i32 GPR:i32:$false,
|
||||
// (so_imm:i32 (imm:i32):$true), (imm:i32):$cc)
|
||||
|
@ -316,10 +316,7 @@ def so_reg : Operand<i32>, // reg reg imm
|
||||
// represented in the imm field in the same 12-bit form that they are encoded
|
||||
// into so_imm instructions: the 8-bit immediate is the least significant bits
|
||||
// [bits 0-7], the 4-bit shift amount is the next 4 bits [bits 8-11].
|
||||
def so_imm : Operand<i32>,
|
||||
PatLeaf<(imm), [{
|
||||
return ARM_AM::getSOImmVal(N->getZExtValue()) != -1;
|
||||
}]> {
|
||||
def so_imm : Operand<i32>, PatLeaf<(imm), [{ return Pred_so_imm(N); }]> {
|
||||
let PrintMethod = "printSOImmOperand";
|
||||
}
|
||||
|
||||
|
@ -51,10 +51,7 @@ def t2_so_imm_neg_XFORM : SDNodeXForm<imm, [{
|
||||
// represented in the imm field in the same 12-bit form that they are encoded
|
||||
// into t2_so_imm instructions: the 8-bit immediate is the least significant
|
||||
// bits [bits 0-7], the 4-bit shift/splat amount is the next 4 bits [bits 8-11].
|
||||
def t2_so_imm : Operand<i32>,
|
||||
PatLeaf<(imm), [{
|
||||
return ARM_AM::getT2SOImmVal((uint32_t)N->getZExtValue()) != -1;
|
||||
}]>;
|
||||
def t2_so_imm : Operand<i32>, PatLeaf<(imm), [{ return Pred_t2_so_imm(N); }]>;
|
||||
|
||||
// t2_so_imm_not - Match an immediate that is a complement
|
||||
// of a t2_so_imm.
|
||||
|
Loading…
x
Reference in New Issue
Block a user