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 | 63607d03b36007ff135dff8103b42a33e64ef80b (patch) | |
| tree | 3ce397ac43b21774b0c70e58a3615ffbcbbc41b6 | |
| parent | f53c2c785cd37ffd76f0a5db506fdef0ca9f100e (diff) | |
| download | external_llvm-63607d03b36007ff135dff8103b42a33e64ef80b.zip external_llvm-63607d03b36007ff135dff8103b42a33e64ef80b.tar.gz external_llvm-63607d03b36007ff135dff8103b42a33e64ef80b.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.cpp | 2 |
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: |
