[llvm] [llubi] Add support for constant expressions (PR #203746)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 14 02:45:41 PDT 2026
================
@@ -89,12 +91,9 @@ std::optional<AnyValue> Context::getConstantValueImpl(Constant *C) {
if (isa<PoisonValue>(C))
return AnyValue::getPoisonValue(*this, C->getType());
- if (isa<ConstantAggregateZero>(C))
+ if (isa<ConstantAggregateZero, ConstantPointerNull>(C))
return AnyValue::getNullValue(*this, C->getType());
- if (isa<ConstantPointerNull>(C))
- return Pointer::null(C->getType()->getPointerAddressSpace(), DL);
----------------
nikic wrote:
I wouldn't combine these cases given that recently non-zero null pointers were introduced...
https://github.com/llvm/llvm-project/pull/203746
More information about the llvm-commits
mailing list