• Cherry Zhang's avatar
    cmd/compile: find last StoreWB explicitly · ed0b232c
    Cherry Zhang authored
    In writebarrier phase, a chain of StoreWBs is rewritten to branchy
    code to invoke write barriers, and the last store in the chain is
    spliced into a Phi op to join the memory of the two branches. We
    must find the last store explicitly, since the values are not
    scheduled and they may not come in dependency order.
    
    Fixes #18169.
    
    Change-Id: If547e3c562ef0669bc5622c1bb711904dc36314d
    Reviewed-on: https://go-review.googlesource.com/33915
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    ed0b232c
writebarrier_test.go 960 Bytes