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 | c73a361ac5d912e43a6613bdf7f68e15d3bfde24 (patch) | |
| tree | 9c169790ccebd8d090e91721e0cc2397b8c11a57 /llvm/lib | |
| parent | d5df1f5b5483ca527ef14567b24641d13064fbda (diff) | |
| download | bcm5719-llvm-c73a361ac5d912e43a6613bdf7f68e15d3bfde24.tar.gz bcm5719-llvm-c73a361ac5d912e43a6613bdf7f68e15d3bfde24.zip | |
SIGN_EXTEND from the same type as the dest is valid.
llvm-svn: 98548
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 5d38fdd5b9e..480c0680880 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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: |

