[llvm] AMDGPU: Improve vector of pointer handling in amdgpu-promote-alloca (PR #114144)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 04:08:11 PST 2024
================
@@ -1115,9 +1115,10 @@ bool AMDGPUPromoteAllocaImpl::binaryOpIsDerivedFromSameAlloca(
if (Val == OtherOp)
OtherOp = Inst->getOperand(OpIdx1);
- if (isa<ConstantPointerNull>(OtherOp))
+ if (isa<ConstantPointerNull>(OtherOp) || isa<ConstantAggregateZero>(OtherOp))
----------------
Pierre-vh wrote:
```suggestion
if (isa<ConstantPointerNull, ConstantAggregateZero>(OtherOp))
```
https://github.com/llvm/llvm-project/pull/114144
More information about the llvm-commits
mailing list