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(
18156
18156
// LD/ST, it can still complete the folding optimization operation performed
18157
18157
// above.
18158
18158
auto isLDST = [&]() {
18159
- bool canOptAwlays = false;
18159
+ bool CanOptAlways = false;
18160
18160
if (N0->getOpcode() == ISD::ADD && !N0->hasOneUse()) {
18161
18161
for (SDNode *Use : N0->uses()) {
18162
18162
// This use is the one we're on right now. Skip it
18163
18163
if (Use == N || Use->getOpcode() == ISD::SELECT)
18164
18164
continue;
18165
18165
if (!isa<StoreSDNode>(Use) && !isa<LoadSDNode>(Use)) {
18166
- canOptAwlays = false;
18166
+ CanOptAlways = false;
18167
18167
break;
18168
18168
}
18169
- canOptAwlays = true;
18169
+ CanOptAlways = true;
18170
18170
}
18171
18171
}
18172
18172
@@ -18177,20 +18177,20 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
18177
18177
if (Use == N0.getNode() || Use->getOpcode() == ISD::SELECT)
18178
18178
continue;
18179
18179
if (!isa<StoreSDNode>(Use) && !isa<LoadSDNode>(Use)) {
18180
- canOptAwlays = false;
18180
+ CanOptAlways = false;
18181
18181
break;
18182
18182
}
18183
- canOptAwlays = true;
18183
+ CanOptAlways = true;
18184
18184
}
18185
18185
}
18186
- return canOptAwlays ;
18186
+ return CanOptAlways ;
18187
18187
};
18188
18188
18189
18189
if (Ty.isScalarInteger() &&
18190
18190
(N0.getOpcode() == ISD::ADD || N0.getOpcode() == ISD::OR)) {
18191
- if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse()) {
18191
+ if (N0.getOpcode() == ISD::ADD && !N0->hasOneUse())
18192
18192
return isLDST();
18193
- }
18193
+
18194
18194
auto *C1 = dyn_cast<ConstantSDNode>(N0->getOperand(1));
18195
18195
auto *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1));
18196
18196
if (C1 && C2) {
You can’t perform that action at this time.
0 commit comments