nhaehnle wrote: Have you thought about the implications for dynamic (non-constant) indices? Stuff like ``` %gep = getelementptr [50 x {i32, [10 x i32]}], ptr %base, i32 0, i32 %outer_idx, i32 1, i32 %inner_idx ``` The current representation allows an `inrange` on the second-to-last index which to my understanding restricts the range to the `[10 x i32]` into which `%gep` falls structurally.
It seems like neither proposed representation is able to capture that in a single `ptradd` (it could be captured with a sequence of two `ptradd`s, but that's an awkward tradeoff). The first proposed representation at least allows handling the case when there is only a single dynamic index, and the `inrange` is to the right of it. https://github.com/llvm/llvm-project/pull/84341 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits