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 | 2f0ca79a7504a91b16156b199b6f07857f3782c6 (patch) | |
tree | 580da16782bc6e1c10b58a16a8107f368705d26a /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | a0bb692b2702843fa4b60b271879d4b0102b8c91 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3f598fd8b3..2b5604fec2 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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 |