[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:52:42 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:
Sorry. I misunderstood `Parent`. You are right, they must be in the same block.
https://github.com/llvm/llvm-project/pull/82306
More information about the llvm-commits
mailing list