Skip to content

Commit 51fa877

Browse files
jcohen-applerjmansfield
authored andcommitted
[MachineCombiner][AArch64] Change mayAlias to isLoadFoldBarrier
1 parent 7b989c8 commit 51fa877

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7492,21 +7492,6 @@ static bool getMiscPatterns(MachineInstr &Root,
74927492
return false;
74937493
}
74947494

7495-
/// Check if a given MachineInstr `MIa` may alias with any of the instructions
7496-
/// in `MemInstrs`.
7497-
static bool mayAlias(const MachineInstr &MIa,
7498-
SmallVectorImpl<const MachineInstr *> &MemInstrs,
7499-
AliasAnalysis *AA) {
7500-
for (const MachineInstr *MIb : MemInstrs) {
7501-
if (MIa.mayAlias(AA, *MIb, /*UseTBAA*/ false)) {
7502-
MIb->dump();
7503-
return true;
7504-
}
7505-
}
7506-
7507-
return false;
7508-
}
7509-
75107495
/// Check if the given instruction forms a gather load pattern that can be
75117496
/// optimized for better Memory-Level Parallelism (MLP). This function
75127497
/// identifies chains of NEON lane load instructions that load data from
@@ -7600,8 +7585,7 @@ static bool getGatherLanePattern(MachineInstr &Root,
76007585

76017586
// Check for potential aliasing with any of the load instructions to
76027587
// optimize.
7603-
if ((CurrInstr.mayLoadOrStore() || CurrInstr.isCall()) &&
7604-
mayAlias(CurrInstr, LoadInstrs, nullptr))
7588+
if (CurrInstr.isLoadFoldBarrier())
76057589
return false;
76067590
}
76077591

0 commit comments

Comments
 (0)