diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-12 16:56:44 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-12 16:56:44 +0000 |
commit | effb894453a6d69a6c6becabb4451ec883d1fe2c (patch) | |
tree | 02bab821b26d225db0ef80d441838217b5b385b1 /llvm/lib/Target/Sparc/SparcISelLowering.cpp | |
parent | fa1472fd552d726d691c708f5dc6628392e13c83 (diff) | |
download | bcm5719-llvm-effb894453a6d69a6c6becabb4451ec883d1fe2c.tar.gz bcm5719-llvm-effb894453a6d69a6c6becabb4451ec883d1fe2c.zip |
Rename ConstantSDNode::getValue to getZExtValue, for consistency
with ConstantInt. This led to fixing a bug in TargetLowering.cpp
using getValue instead of getAPIntValue.
llvm-svn: 56159
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcISelLowering.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp index e46942276d3..07b108ddd1f 100644 --- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp +++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp @@ -224,10 +224,10 @@ SparcTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG, } static SDValue LowerCALL(SDValue Op, SelectionDAG &DAG) { - unsigned CallingConv = cast<ConstantSDNode>(Op.getOperand(1))->getValue(); + unsigned CallingConv = cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue(); SDValue Chain = Op.getOperand(0); SDValue Callee = Op.getOperand(4); - bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0; + bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getZExtValue() != 0; #if 0 // Analyze operands of the call, assigning locations to each operand. @@ -691,7 +691,8 @@ void SparcTargetLowering::computeMaskedBitsForTargetNode(const SDValue Op, // set LHS/RHS and SPCC to the LHS/RHS of the setcc and SPCC to the condition. static void LookThroughSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode CC, unsigned &SPCC) { - if (isa<ConstantSDNode>(RHS) && cast<ConstantSDNode>(RHS)->getValue() == 0 && + if (isa<ConstantSDNode>(RHS) && + cast<ConstantSDNode>(RHS)->getZExtValue() == 0 && CC == ISD::SETNE && ((LHS.getOpcode() == SPISD::SELECT_ICC && LHS.getOperand(3).getOpcode() == SPISD::CMPICC) || @@ -699,10 +700,10 @@ static void LookThroughSetCC(SDValue &LHS, SDValue &RHS, LHS.getOperand(3).getOpcode() == SPISD::CMPFCC)) && isa<ConstantSDNode>(LHS.getOperand(0)) && isa<ConstantSDNode>(LHS.getOperand(1)) && - cast<ConstantSDNode>(LHS.getOperand(0))->getValue() == 1 && - cast<ConstantSDNode>(LHS.getOperand(1))->getValue() == 0) { + cast<ConstantSDNode>(LHS.getOperand(0))->getZExtValue() == 1 && + cast<ConstantSDNode>(LHS.getOperand(1))->getZExtValue() == 0) { SDValue CMPCC = LHS.getOperand(3); - SPCC = cast<ConstantSDNode>(LHS.getOperand(2))->getValue(); + SPCC = cast<ConstantSDNode>(LHS.getOperand(2))->getZExtValue(); LHS = CMPCC.getOperand(0); RHS = CMPCC.getOperand(1); } |