[llvm] [SandboxVec][LoadStoreVec] Vectorize load seed chains (PR #215944)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 08:00:43 PDT 2026


================
@@ -104,22 +105,23 @@ unsigned VecUtils::getFloorPowerOf2(unsigned Num) {
   return Num & ~Mask;
 }
 
+template <typename T>
 void VecUtils::DeadInstructionMorgue::collectPotentiallyDeadInstrs(
-    ArrayRef<Value *> Bndl) {
-  for (Value *V : Bndl)
+    ArrayRef<T *> Bndl) {
+  for (T *V : Bndl)
     DeadInstrCandidates.insert(cast<Instruction>(V));
----------------
vporpo wrote:

Since this is now a template, we should probably add an assert along the lines of: `assert (isa<Instruction>(V) && "Only works with Instructions")`

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


More information about the llvm-commits mailing list