SIGN_EXTEND from the same type as the dest is valid.

llvm-svn: 98548
This commit is contained in:
Chris Lattner 2010-03-15 16:15:56 +00:00
parent d5df1f5b54
commit c73a361ac5
1 changed files with 1 additions and 1 deletions

View File

@ -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: