[DAGCombiner] Fix a couple mistakes from r324311 by really passing the original load to ExtendSetCCUses.
We're passing the binary op that uses the load instead of the load. Noticed by inspection. Not sure how to test this because this just prevents the introduction of an extend that will later be truncated and will probably be combined out. llvm-svn: 324568
This commit is contained in:
parent
9b9d527427
commit
c19aed963e
@ -7622,7 +7622,8 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
|
||||
Mask = Mask.sext(VT.getSizeInBits());
|
||||
SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
|
||||
ExtLoad, DAG.getConstant(Mask, DL, VT));
|
||||
ExtendSetCCUses(SetCCs, N0, ExtLoad, DL, ISD::SIGN_EXTEND);
|
||||
ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, DL,
|
||||
ISD::SIGN_EXTEND);
|
||||
bool NoReplaceTruncAnd = !N0.hasOneUse();
|
||||
bool NoReplaceTrunc = SDValue(LN00, 0).hasOneUse();
|
||||
CombineTo(N, And);
|
||||
@ -7926,7 +7927,8 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
|
||||
SDLoc DL(N);
|
||||
SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
|
||||
ExtLoad, DAG.getConstant(Mask, DL, VT));
|
||||
ExtendSetCCUses(SetCCs, N0, ExtLoad, DL, ISD::ZERO_EXTEND);
|
||||
ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, DL,
|
||||
ISD::ZERO_EXTEND);
|
||||
bool NoReplaceTruncAnd = !N0.hasOneUse();
|
||||
bool NoReplaceTrunc = SDValue(LN00, 0).hasOneUse();
|
||||
CombineTo(N, And);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user