When canonicalizing gep+add into gep+gep we can preserve inbounds if the add is also nsw and both add operands are non-negative (or both negative, but I don't think that's practically relevant). Proof: https://alive2.llvm.org/ce/z/tJLBta
10 KiB
10 KiB