Commit 3a17fdab authored by David Chase's avatar David Chase

cmd/compile: correct maintain use count when phi args merge

The critical phase did not correctly maintain the use count
when two predecessors of a new critical block transmit the
same value.

Change-Id: Iba802c98ebb84e36a410721ec32c867140efb6d4
Reviewed-on: https://go-review.googlesource.com/20822Reviewed-by: 's avatarKeith Randall <khr@golang.org>
Reviewed-by: 's avatarTodd Neal <todd@tneal.org>
parent ebd9f1bd
......@@ -79,6 +79,7 @@ func critical(f *Func) {
if reusedBlock {
d.Preds = append(d.Preds, c)
b.Preds[i] = nil
phi.Args[i].Uses--
phi.Args[i] = nil
} else {
// splice it in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment