diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-15 16:15:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-15 16:15:56 +0000 |
commit | ed7d10e1000ae88c9ec7a0db6002eb8b8543a470 (patch) | |
tree | 3ce397ac43b21774b0c70e58a3615ffbcbbc41b6 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 7fb5c2dbec26b7de959269ade8906a7a1b6c7539 (diff) |
SIGN_EXTEND from the same type as the dest is valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98548 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 5d38fdd5b9..480c068088 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2332,7 +2332,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, switch (Opcode) { default: break; case ISD::SIGN_EXTEND: - return getConstant(APInt(Val).sext(VT.getSizeInBits()), VT); + return getConstant(APInt(Val).sextOrTrunc(VT.getSizeInBits()), VT); case ISD::ANY_EXTEND: case ISD::ZERO_EXTEND: case ISD::TRUNCATE: |