[llvm] [GlobalISel] Make sure to check for load barriers when merging G_EXTRACT_VECTOR_ELT into G_LOAD. (PR #82306)
Owen Anderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 09:00:44 PST 2024
================
@@ -1198,6 +1198,18 @@ bool CombinerHelper::matchCombineExtractedVectorLoad(MachineInstr &MI,
if (!VecEltTy.isByteSized())
return false;
+ // Check for load fold barriers between the extraction and the load.
+ if (MI.getParent() != LoadMI->getParent())
+ return false;
+ const unsigned MaxIter = 20;
+ unsigned Iter = 0;
+ for (auto II = LoadMI->getIterator(), IE = MI.getIterator(); II != IE; ++II) {
----------------
resistor wrote:
I'm not aware of an option.
https://github.com/llvm/llvm-project/pull/82306
More information about the llvm-commits
mailing list