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

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 09:12:55 PDT 2026


================
@@ -243,6 +243,34 @@ static const int MinScheduleRegionSize = 16;
 /// Maximum allowed number of operands in the PHI nodes.
 static const unsigned MaxPHINumOperands = 128;
 
+/// For instructions that are not trivially vectorizable, try to vectorize their
+/// operands.
+/// FIXME: Extend for all non-vectorized functions.
+SmallVector<Value *, 4>
+getNonTriviallyVectorizableIntrinsicCallOperand(Value *V) {
+
+  auto *II = dyn_cast<IntrinsicInst>(V);
+  if (!II || isAssumeLikeIntrinsic(II))
+    return {};
+
+  if (isTriviallyVectorizable(II->getIntrinsicID()))
+    return {};
+
+  // Skip memory intrinsics (e.g., masked.load, masked.gather etc.)
----------------
alexey-bataev wrote:

Fix the comment here

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


More information about the llvm-commits mailing list