mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Check the right value type. This fixes 186.crafty on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b13f83eb23
commit
bf3708794f
@ -1768,7 +1768,8 @@ SDOperand DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
|
||||
|
||||
// fold (sext (truncate x)) -> (sextinreg x).
|
||||
if (N0.getOpcode() == ISD::TRUNCATE &&
|
||||
(!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, VT))) {
|
||||
(!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG,
|
||||
N0.getValueType()))) {
|
||||
SDOperand Op = N0.getOperand(0);
|
||||
if (Op.getValueType() < VT) {
|
||||
Op = DAG.getNode(ISD::ANY_EXTEND, VT, Op);
|
||||
|
Loading…
Reference in New Issue
Block a user