[llvm] [SLP][AMDGPU] Vectorize operands of non-trivially-vectorizable intrinsic calls (PR #189784)

Syadus Sefat via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 08:53:54 PDT 2026


================
@@ -29477,6 +29507,28 @@ bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) {
       PostProcessCmps.insert(cast<CmpInst>(&*It));
   }
 
+  // Collect operands of non-trivially vectorizable intrinsic calls (e.g.,
+  // llvm.amdgcn.exp2) and group by intrinsic ID, so their operands can be
+  // vectorized independently.
+  // FIXME: Extend for all non-vectorized functions.
+  SmallMapVector<std::pair<Intrinsic::ID, unsigned>, SmallVector<Value *, 4>, 4>
+      OpcodeGroups;
+
+  for (Instruction &I : *BB) {
----------------
mssefat wrote:

Thanks for the guidance. Fixed it. I am no longer creating that separate loop. Please check.

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


More information about the llvm-commits mailing list