File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -18156,17 +18156,17 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1815618156 // LD/ST, it can still complete the folding optimization operation performed
1815718157 // above.
1815818158 auto isLDST = [&]() {
18159- bool canOptAwlays = false;
18159+ bool CanOptAlways = false;
1816018160 if (N0->getOpcode() == ISD::ADD && !N0->hasOneUse()) {
1816118161 for (SDNode *Use : N0->uses()) {
1816218162 // This use is the one we're on right now. Skip it
1816318163 if (Use == N || Use->getOpcode() == ISD::SELECT)
1816418164 continue;
1816518165 if (!isa<StoreSDNode>(Use) && !isa<LoadSDNode>(Use)) {
18166- canOptAwlays = false;
18166+ CanOptAlways = false;
1816718167 break;
1816818168 }
18169- canOptAwlays = true;
18169+ CanOptAlways = true;
1817018170 }
1817118171 }
1817218172
@@ -18177,20 +18177,20 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
1817718177 if (Use == N0.getNode() || Use->getOpcode() == ISD::SELECT)
1817818178 continue;
1817918179 if (!isa<StoreSDNode>(Use) && !isa<LoadSDNode>(Use)) {
18180- canOptAwlays = false;
18180+ CanOptAlways = false;
1818118181 break;
1818218182 }
18183- canOptAwlays = true;
18183+ CanOptAlways = true;
1818418184 }
1818518185 }
18186- return canOptAwlays ;
18186+ return CanOptAlways ;
1818718187 };
1818818188
1818918189 if (Ty.isScalarInteger() &&
1819018190 (N0.getOpcode() == ISD::ADD || N0.getOpcode() == ISD::OR)) {
18191- if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse()) {
18191+ if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse())
1819218192 return isLDST();
18193- }
18193+
1819418194 auto *C1 = dyn_cast<ConstantSDNode>(N0->getOperand(1));
1819518195 auto *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1));
1819618196 if (C1 && C2) {
You can’t perform that action at this time.
0 commit comments