mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Fix a miscompilation in crafty due to a recent patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a7e8375a9
commit
00cb95c9be
@ -1582,7 +1582,7 @@ SDOperand DAGCombiner::visitZERO_EXTEND(SDNode *N) {
|
||||
// fold (zext (truncate x)) -> (zextinreg x) iff x size == zext size.
|
||||
if (N0.getOpcode() == ISD::TRUNCATE && N0.getOperand(0).getValueType() == VT&&
|
||||
!AfterLegalize)
|
||||
return DAG.getZeroExtendInReg(N0.getOperand(0), VT);
|
||||
return DAG.getZeroExtendInReg(N0.getOperand(0), N0.getValueType());
|
||||
// fold (zext (load x)) -> (zext (truncate (zextload x)))
|
||||
if (N0.getOpcode() == ISD::LOAD && N0.hasOneUse()) {
|
||||
SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N0.getOperand(0),
|
||||
|
Loading…
Reference in New Issue
Block a user