[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 10:48:05 PDT 2025
https://github.com/efriedma-quic commented:
I somehow thought we had already done something about this, but I can't find any reference to it.
Anyway, if we're going to support this as an extension, I don't want to bury it in CGBuilder.h. We should decide exactly when we want it to trigger, and make it trigger for those language constructs. Not any construct that happens to go through CreateStructGEP, and not any pointer that happens to get folded to ConstantPointerNull. (Note on some targets, some null pointers are not ConstantPointerNull.)
https://github.com/llvm/llvm-project/pull/130734
More information about the cfe-commits
mailing list