efriedma-quic wrote: I don't think this is safe: we can't tell if a global actually has one use in the final machine code by examining the IR. Passes after isel can clone code. https://github.com/llvm/llvm-project/pull/125065