[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jan 12 10:51:28 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.27 -> 1.28
---
Log message:
Do not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.
This fixes llvm-test/SingleSource/Regression/C/casts.c
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.27 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.28
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.27 Wed Jan 12 12:37:47 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Jan 12 12:51:15 2005
@@ -511,8 +511,8 @@
break;
case ISD::ZERO_EXTEND:
if (Operand.getValueType() == VT) return Operand; // noop extension
- if (OpOpcode == ISD::SIGN_EXTEND || OpOpcode == ISD::ZERO_EXTEND)
- return getNode(OpOpcode, VT, Operand.Val->getOperand(0));
+ if (OpOpcode == ISD::ZERO_EXTEND)
+ return getNode(ISD::ZERO_EXTEND, VT, Operand.Val->getOperand(0));
break;
case ISD::TRUNCATE:
if (Operand.getValueType() == VT) return Operand; // noop truncate
More information about the llvm-commits
mailing list