[llvm] [SROA] Pre-split overlapping move slices within a partition (PR #210061)

Yonah Goldberg via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 15:05:31 PDT 2026


================
@@ -4805,6 +4805,43 @@ static Type *getTypePartition(const DataLayout &DL, Type *Ty, uint64_t Offset,
   return SubTy;
 }
 
+/// Try to find a slice in P that overlaps with S, and which forms a load/store
+/// pair with S (i.e. the two slices are used to perform a memmove-like copy
+/// within P).
+static Slice *findOverlappingCopySlice(Slice &S, Partition &P) {
+  // Single byte slices can't overlap anything
----------------
YonahGoldberg wrote:

same here, single byte slices can't partially overlap

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


More information about the llvm-commits mailing list