[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 10 12:56:06 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.52 -> 1.53
---
Log message:
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!
---
Diffs of the changes: (+1 -1)
SelectionDAG.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.52 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.53
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.52 Wed Mar 9 12:37:12 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Mar 10 14:55:51 2005
@@ -961,7 +961,7 @@
// 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);
More information about the llvm-commits
mailing list