[clang] [cuda][HIP] `__constant__` should imply constant (PR #110182)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 27 10:50:22 PDT 2024
Artem-B wrote:
> In this case, _ZL4cxxx does not have externally_initialized . If this patch does not remove externally_initialized, probably this constant propagation won't happen.
Indeed, unoptimized code shows that `cxxx` has no `externally_initialized`, only `constant`.
If we keep externally_initialized, it appears to preserve the array and the loads from it, so it should be fine: https://godbolt.org/z/YeWE3z79r
https://github.com/llvm/llvm-project/pull/110182
More information about the cfe-commits
mailing list