efriedma-quic wrote: > We only perform this optimization in addrspace(0).
I'd still prefer to get this right for all address-spaces, so we don't need to revisit later. But really, I'm more concerned about the "happens to get folded" part: there isn't a stable set of values that get constant-folded, at the LLVM IR level, it's just whether IRBuilder happens to do today. The only way to get a stable answer is to query the AST (Expr::isNullPointerConstant). https://github.com/llvm/llvm-project/pull/130734 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits