diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-12 18:51:15 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-12 18:51:15 +0000 | 
| commit | 4dfd2cfc0c297f8ac0c1cbf345011845555fa4ee (patch) | |
| tree | 7e809095e60c2c9afd3bdf3f8a6948cf4d258c2b | |
| parent | 7b1dae8032d9462da6801b74476e78c17abbd28f (diff) | |
| download | bcm5719-llvm-4dfd2cfc0c297f8ac0c1cbf345011845555fa4ee.tar.gz bcm5719-llvm-4dfd2cfc0c297f8ac0c1cbf345011845555fa4ee.zip  | |
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
llvm-svn: 19519
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3f598fd8b32..2b5604fec2a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -511,8 +511,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,      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  | 

