[llvm] [Vectorize] Vectorization for __builtin_prefetch (PR #66160)
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 30 04:00:25 PST 2023
================
@@ -4278,8 +4287,18 @@ bool LoopVectorizationCostModel::isScalarWithPredication(
switch(I->getOpcode()) {
default:
return true;
- case Instruction::Call:
- return !VFDatabase::hasMaskedVariant(*(cast<CallInst>(I)), VF);
+ case Instruction::Call: {
+ if (!isa<PrefetchInst>(I))
+ return !VFDatabase::hasMaskedVariant(*(cast<CallInst>(I)), VF);
+ auto *Ptr = getPrefetchPointerOperand(I);
----------------
rengolin wrote:
Can't you implement `hasMaskedVariant` for prefetch?
https://github.com/llvm/llvm-project/pull/66160
More information about the llvm-commits
mailing list