[llvm-commits] [llvm] r98548 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
sabre at nondot.org
Mon Mar 15 09:15:56 PDT 2010
Author: lattner
Date: Mon Mar 15 11:15:56 2010
New Revision: 98548
URL: http://llvm.org/viewvc/llvm-project?rev=98548&view=rev
Log:
SIGN_EXTEND from the same type as the dest is valid.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=98548&r1=98547&r2=98548&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Mar 15 11:15:56 2010
@@ -2332,7 +2332,7 @@
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:
More information about the llvm-commits
mailing list