[llvm] [GlobalISel] Make sure to check for load barriers when merging G_EXTRACT_VECTOR_ELT into G_LOAD. (PR #82306)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 09:05:00 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())
----------------
tschuett wrote:
This check should not be necessary. `MI` and `LoadMI` are in the same function.
https://github.com/llvm/llvm-project/pull/82306
More information about the llvm-commits
mailing list