danilaml wrote: This exposed the following issue (looks like certain trivial transforms can happen after GEPs been added to the list that would make their index constant): https://github.com/llvm/llvm-project/issues/78298 https://github.com/llvm/llvm-project/pull/76660