[llvm] [NFCI][IR] Add optional DataLayout argument to zero and null value related APIs (PR #183208)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 09:11:19 PDT 2026
shiltian wrote:
The change for `ConstantPointerNull` to represent both scalar and vector was merged. I think we can safely just check against `ConstantPointerNull` for most of the cases. However, I'm still not sure about the remaining small part, as I have asked in https://github.com/llvm/llvm-project/pull/183208#discussion_r3177291371: what would be the result of `isNullValue` and `isZeroValue` on things like `{ i32, ptr, i64}`? I suppose `isZeroValue` is fairly simple: check against `ConstantAggregateZero`, but for `isNullValue` (or `isNullPtr` or whatever name we will use in the future), I suppose we still need to check recursively? Or we simply just say, `isNullX` is only valid for pointers?
https://github.com/llvm/llvm-project/pull/183208
More information about the llvm-commits
mailing list