• Michael Munday's avatar
    cmd/compile: keep autos if their address reaches a control value · 1546ab5a
    Michael Munday authored
    Autos must be kept if their address reaches the control value of a
    block. We didn't see this before because it is rare for an auto's
    address to reach a control value without also reaching a phi or
    being written to memory. We can probably optimize away the
    comparisons that lead to this scenario since autos cannot alias
    with pointers from elsewhere, however for now we take the
    conservative approach and just ensure the auto is properly
    initialised if its address reaches a control value.
    
    Fixes #26407.
    
    Change-Id: I02265793f010a9e001c3e1a5397c290c6769d4de
    Reviewed-on: https://go-review.googlesource.com/124335Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    1546ab5a
deadstore.go 8.61 KB