[InstCombine] propagate 'nsw' on pointer difference of 'inbounds' geps
This is a retry of 324a5320. I cautiously reverted that at 6aa3fc4a because the rules about gep math were not clear. Since then, we have added this line to LangRef for gep inbounds: "The successive addition of offsets (without adding the base address) does not wrap the pointer index type in a signed sense (nsw)." See D90708 and post-commit comments on the revert patch for more details.
Loading
Please sign in to comment