[llvm] [AMDGPU] Visit PromoteAlloca users in dominance order (PR #215686)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 07:13:13 PDT 2026


ruiling wrote:

Another cheap fix would be to always create a new value to be passed to SSAUpdater. I think we have only one place that would use existing value in input IR. That is when we process the `store`.
```
    if (Constant *CI = dyn_cast<Constant>(Index))
      if (CI->isNullValue() && AccessSize == VecStoreSize)
        return Builder.CreateBitPreservingCastChain(DL, Val, AA.Vector.Ty);
```
We can create a `freeze` of that value here, so we would always use a new value for SSAUpdater, the replace happened for `load` would not have conflict with SSAUpdater.

It seems hard for other two `return`s under `store` return existing value in input IR. But I think it won't hurt to add a `freeze` for them.

https://github.com/llvm/llvm-project/pull/215686


More information about the llvm-commits mailing list