aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-10 20:55:51 +0000
committerChris Lattner <sabre@nondot.org>2005-03-10 20:55:51 +0000
commitee639f1760ea3d22c46b141393eab611a4de2200 (patch)
tree17b14d759dde9d859c1f2a77aa716499e3d31566 /lib
parent572668aa38e080b1c361c93b91a7d367a69e3015 (diff)
Fix a bug where we would incorrectly do a sign ext instead of a zero ext
because we were checking the wrong thing. Thanks to andrew for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index fb52d11bd3..d4804d9822 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -961,7 +961,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,SDOperand N1,
// Extending a constant? Just return the constant.
if (ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.Val)) {
SDOperand Tmp = getNode(ISD::TRUNCATE, EVT, N1);
- if (N1.getOpcode() == ISD::ZERO_EXTEND_INREG)
+ if (Opcode == ISD::ZERO_EXTEND_INREG)
return getNode(ISD::ZERO_EXTEND, VT, Tmp);
else
return getNode(ISD::SIGN_EXTEND, VT, Tmp);