summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-12 16:56:44 +0000
committerDan Gohman <gohman@apple.com>2008-09-12 16:56:44 +0000
commitf5aeb1a8e4cf272c7348376d185ef8d8267653e0 (patch)
tree26c1d701871fd86197411a728c2dfde5c805254b /utils
parent0e3b7b2f91427807c3f544e96818072cc804e1d3 (diff)
downloadllvm-f5aeb1a8e4cf272c7348376d185ef8d8267653e0.tar.gz
llvm-f5aeb1a8e4cf272c7348376d185ef8d8267653e0.tar.bz2
llvm-f5aeb1a8e4cf272c7348376d185ef8d8267653e0.tar.xz
Rename ConstantSDNode::getValue to getZExtValue, for consistency
with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 36e18ab5ca..3bc7dc2c7c 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -781,7 +781,7 @@ public:
}
emitCode("SDValue " + TmpVar +
" = CurDAG->getTargetConstant(((" + CastType +
- ") cast<ConstantSDNode>(" + Val + ")->getValue()), " +
+ ") cast<ConstantSDNode>(" + Val + ")->getZExtValue()), " +
getEnumName(N->getTypeNum(0)) + ");");
// Add Tmp<ResNo> to VariableMap, so that we don't multiply select this
// value if used multiple times by this pattern result.
@@ -1839,7 +1839,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
OS << " N.getNode()->dump(CurDAG);\n";
} else {
OS << " unsigned iid = cast<ConstantSDNode>(N.getOperand("
- "N.getOperand(0).getValueType() == MVT::Other))->getValue();\n"
+ "N.getOperand(0).getValueType() == MVT::Other))->getZExtValue();\n"
<< " cerr << \"intrinsic %\"<< "
"Intrinsic::getName((Intrinsic::ID)iid);\n";
}
@@ -1914,7 +1914,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
OS << "SDNode *Select_EXTRACT_SUBREG(const SDValue &N) {\n"
<< " SDValue N0 = N.getOperand(0);\n"
<< " SDValue N1 = N.getOperand(1);\n"
- << " unsigned C = cast<ConstantSDNode>(N1)->getValue();\n"
+ << " unsigned C = cast<ConstantSDNode>(N1)->getZExtValue();\n"
<< " SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
<< " AddToISelQueue(N0);\n"
<< " return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::EXTRACT_SUBREG,\n"
@@ -1925,7 +1925,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
<< " SDValue N0 = N.getOperand(0);\n"
<< " SDValue N1 = N.getOperand(1);\n"
<< " SDValue N2 = N.getOperand(2);\n"
- << " unsigned C = cast<ConstantSDNode>(N2)->getValue();\n"
+ << " unsigned C = cast<ConstantSDNode>(N2)->getZExtValue();\n"
<< " SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
<< " AddToISelQueue(N1);\n"
<< " AddToISelQueue(N0);\n"
@@ -2036,7 +2036,8 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
<< " N.getNode()->dump(CurDAG);\n"
<< " } else {\n"
<< " unsigned iid = cast<ConstantSDNode>(N.getOperand("
- "N.getOperand(0).getValueType() == MVT::Other))->getValue();\n"
+ "N.getOperand(0).getValueType() == "
+ "MVT::Other))->getZExtValue();\n"
<< " cerr << \"intrinsic %\"<< "
"Intrinsic::getName((Intrinsic::ID)iid);\n"
<< " }\n"