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/CellSPU/SPUISelDAGToDAG.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/CellSPU/SPUISelDAGToDAG.cpp')
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp index ec7e754bb99..7b667ec8ba1 100644 --- a/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp +++ b/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp @@ -87,7 +87,7 @@ namespace { bool isI16IntU10Immediate(ConstantSDNode *CN) { - return isU10Constant((short) CN->getValue()); + return isU10Constant((short) CN->getZExtValue()); } //! SDNode predicate for i16 sign-extended, 10-bit immediate values @@ -111,15 +111,15 @@ namespace { isIntS16Immediate(ConstantSDNode *CN, short &Imm) { MVT vt = CN->getValueType(0); - Imm = (short) CN->getValue(); + Imm = (short) CN->getZExtValue(); if (vt.getSimpleVT() >= MVT::i1 && vt.getSimpleVT() <= MVT::i16) { return true; } else if (vt == MVT::i32) { - int32_t i_val = (int32_t) CN->getValue(); + int32_t i_val = (int32_t) CN->getZExtValue(); short s_val = (short) i_val; return i_val == s_val; } else { - int64_t i_val = (int64_t) CN->getValue(); + int64_t i_val = (int64_t) CN->getZExtValue(); short s_val = (short) i_val; return i_val == s_val; } @@ -676,7 +676,7 @@ SPUDAGToDAGISel::Select(SDValue Op) { if (Op1.getOpcode() == ISD::Constant) { ConstantSDNode *CN = cast<ConstantSDNode>(Op1); - Op1 = CurDAG->getTargetConstant(CN->getValue(), VT); + Op1 = CurDAG->getTargetConstant(CN->getZExtValue(), VT); NewOpc = (isI32IntS10Immediate(CN) ? SPU::AIr32 : SPU::Ar32); AddToISelQueue(Op0); AddToISelQueue(Op1); |

