Open
Description
In https://github.com/rust-lang/rust/pull/138157/files#diff-ec1143edac0931158bf79d598432eb162f53400086d30bfe1ba5266559831174R17 you can see that, because it's in a loop (I think [ed: wrongly, apparently]), the Option<u32>
ends up getting spilled to an alloca
despite it having ScalarPair
ABI.
However it's only used in the same basic block, with the use after the initialization. Thus ideally we'd be able to just emit it as SSA values directly, rather than needing the read/write to the alloca
.
(The full rule is probably a dominance check, but I don't know if the full one is worth doing, vs a simple approximation that catches common cases.)