[llvm] [LSROA] Add logical SROA pass (PR #192058)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 07:33:12 PDT 2026
================
@@ -15318,6 +15318,14 @@ If the source pointer is poison, the instruction returns poison.
The resulting pointer belongs to the same address space as ``source``.
This instruction does not dereference the pointer.
+Chaining indices in a single ``llvm.structured.gep`` instruction or spliting
+is sequentialy over multiple has exactly the same behavior. As such, two
+``llvm.structured.gep`` instruction can be merged if the second one base
+pointer is the result of the first by appending the indices of the second to
+the first.
+Conversely, a single structured GEP instruction can be split in to by
+splitting the indices sequence over multiple instructions.
----------------
Keenuts wrote:
Ah right, yes this is fine, at least we extract the array from the parent struct. I added tests for this case too.
For now, this pass doesn't split arrays, but that's something we can add (#192620)
https://github.com/llvm/llvm-project/pull/192058
More information about the llvm-commits
mailing list