Skip to content

Commit

Permalink
[LAA] Fixing LoopAccessAnalysis to ignore Tapir instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
neboat authored and tarunprabhu committed Sep 26, 2023
1 parent aae559f commit 5320986
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions llvm/lib/Analysis/LoopAccessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,11 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI,
!VFDatabase::getMappings(*Call).empty())
continue;

// TODO: Determine if we should do something other than ignore Tapir
// instructions here.
if (isa<DetachInst>(&I) || isa<ReattachInst>(&I) || isa<SyncInst>(&I))
continue;

auto *Ld = dyn_cast<LoadInst>(&I);
if (!Ld) {
recordAnalysis("CantVectorizeInstruction", Ld)
Expand All @@ -2291,6 +2296,11 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI,

// Save 'store' instructions. Abort if other instructions write to memory.
if (I.mayWriteToMemory()) {
// TODO: Determine if we should do something other than ignore Tapir
// instructions here.
if (isa<DetachInst>(&I) || isa<ReattachInst>(&I) || isa<SyncInst>(&I))
continue;

auto *St = dyn_cast<StoreInst>(&I);
if (!St) {
recordAnalysis("CantVectorizeInstruction", St)
Expand Down

0 comments on commit 5320986

Please sign in to comment.