[llvm-branch-commits] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)

Benjamin Maxwell via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 9 04:34:16 PST 2024


================
@@ -427,6 +428,29 @@ Value *VPInstruction::generate(VPTransformState &State) {
                                    {PredTy, ScalarTC->getType()},
                                    {VIVElem0, ScalarTC}, nullptr, Name);
   }
+  // Count the number of bits set in each lane and reduce the result to a scalar
+  case VPInstruction::PopCount: {
+    Value *Op = State.get(getOperand(0));
+    auto *VT = Op->getType();
----------------
MacDue wrote:

nit: Spell out type if it's not present on the RHS.
```suggestion
    Type *VT = Op->getType();
```

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


More information about the llvm-branch-commits mailing list