mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-20 12:31:40 +00:00
Fix another instance of the DAG combiner not using the correct type for the RHS of a shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129522 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2cb2aa610e
commit
a34d93630e
@ -3323,8 +3323,10 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
|
||||
return DAG.getUNDEF(VT);
|
||||
|
||||
if (!LegalTypes || TLI.isTypeDesirableForOp(ISD::SRL, SmallVT)) {
|
||||
uint64_t ShiftAmt = N1C->getZExtValue();
|
||||
SDValue SmallShift = DAG.getNode(ISD::SRL, N0.getDebugLoc(), SmallVT,
|
||||
N0.getOperand(0), N1);
|
||||
N0.getOperand(0),
|
||||
DAG.getConstant(ShiftAmt, getShiftAmountTy(SmallVT)));
|
||||
AddToWorkList(SmallShift.getNode());
|
||||
return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, SmallShift);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user