[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:50:12 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())
----------------
resistor wrote:

They are in the same function, but not necessarily in the same block, right?

https://github.com/llvm/llvm-project/pull/82306


More information about the llvm-commits mailing list