[llvm] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 03:00:22 PST 2024


================
@@ -1397,9 +1397,9 @@ void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB) {
       assignSlot(Def);
 }
 
-bool vputils::onlyFirstLaneUsed(VPValue *Def) {
+bool vputils::onlyFirstLaneUsed(const VPValue *Def) {
   return all_of(Def->users(),
-                [Def](VPUser *U) { return U->onlyFirstLaneUsed(Def); });
+                [Def](const VPUser *U) { return U->onlyFirstLaneUsed(Def); });
----------------
ayalz wrote:

nit: this NFC of adding const could be pushed separately?

https://github.com/llvm/llvm-project/pull/80269


More information about the llvm-commits mailing list