[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 13:26:13 PDT 2024


https://github.com/efriedma-quic commented:

This is clearly not what we want long-term.  Either clang or LLVM should have better heuristics based on the actual values being stored; the syntax used at the C level shouldn't affect codegen.

That said, reverting the change with a carveout for the trivial var init is probably reasonable as a temporary step, if we want something we can cherry-pick for 18.x.

Please add a better comment explaining the history here; the current comment isn't really sufficient to explain why we're using heuristics which don't really make sense.

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


More information about the cfe-commits mailing list