[DAG] visitSRL - pull out ShiftVT. NFC.

This commit is contained in:
Simon Pilgrim 2022-06-12 14:02:23 +01:00
parent 963c0a0147
commit 54ae4ca755
1 changed files with 1 additions and 1 deletions

View File

@ -9332,6 +9332,7 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
return V;
EVT VT = N0.getValueType();
EVT ShiftVT = N1.getValueType();
unsigned OpSizeInBits = VT.getScalarSizeInBits();
// fold (srl c1, c2) -> c1 >>u c2
@ -9373,7 +9374,6 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
};
if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) {
SDLoc DL(N);
EVT ShiftVT = N1.getValueType();
SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1));
return DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Sum);
}