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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to