aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-15 16:15:56 +0000
committerChris Lattner <sabre@nondot.org>2010-03-15 16:15:56 +0000
commited7d10e1000ae88c9ec7a0db6002eb8b8543a470 (patch)
tree3ce397ac43b21774b0c70e58a3615ffbcbbc41b6
parent7fb5c2dbec26b7de959269ade8906a7a1b6c7539 (diff)
downloadexternal_llvm-ed7d10e1000ae88c9ec7a0db6002eb8b8543a470.zip
external_llvm-ed7d10e1000ae88c9ec7a0db6002eb8b8543a470.tar.gz
external_llvm-ed7d10e1000ae88c9ec7a0db6002eb8b8543a470.tar.bz2
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
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 5d38fdd..480c068 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: