1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:10:21 -07:00

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/20822
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Todd Neal <todd@tneal.org>
This commit is contained in:
David Chase 2016-03-17 16:14:41 -04:00
parent ebd9f1bd4c
commit 3a17fdaba0

View File

@ -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