Skip to content

Commit 85f49a5

Browse files
fixup! update comment
1 parent f8c54d4 commit 85f49a5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,11 +1067,7 @@ RISCVVLOptimizer::getMinimumVLForUser(MachineOperand &UserOp) {
10671067
}
10681068

10691069
// Instructions like reductions may use a vector register as a scalar
1070-
// register. In this case, we should treat it like a scalar register which
1071-
// does not impact the decision on whether to optimize VL. But if there is
1072-
// another user of MI and it may have VL=0, we need to be sure not to reduce
1073-
// the VL of MI to zero when the VLOp of UserOp may be non-zero. The most
1074-
// we can reduce it to is one.
1070+
// register. In this case, we should treat it as only reading the first lane.
10751071
if (isVectorOpUsedAsScalarOp(UserOp)) {
10761072
[[maybe_unused]] Register R = UserOp.getReg();
10771073
[[maybe_unused]] const TargetRegisterClass *RC = MRI->getRegClass(R);

0 commit comments

Comments
 (0)