[clang] [clang] Emit nuw GEPs for array subscript expressions (PR #103088)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 22 12:43:26 PDT 2024


efriedma-quic wrote:

Oh, I see.

If you can prove that it would be illegal to use a negative index with a particular pointer, you might be able to optimize... but I'm not sure how aggressive we want to be here.  Even if the C standard technically disallows indexing past the beginning/end of a member array, it's not something we've historically checked or optimized, so it's likely to break code.

https://github.com/llvm/llvm-project/pull/103088


More information about the cfe-commits mailing list