Commit 1c05b9b0 authored by Keith Randall's avatar Keith Randall Committed by Heschi Kreinick
Browse files

[release-branch.go1.17] cmd/compile: fix fuse pass to do CFG surgery correctly

removePred and removeArg do different things. removePred moves the last
predecessor to index k, whereas removeArg slides all the args k or
greater down by 1 index.

Kind of unfortunate different behavior in things named similarly.

Fixes #49129

Change-Id: I9ae409bdac744e713f4c121f948e43db6fdc8542
Reviewed-on: https://go-review.googlesource.com/c/go/+/358117


Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarCuong Manh Le <cuong.manhle.vn@gmail.com>
(cherry picked from commit 8dbf3e93)
Reviewed-on: https://go-review.googlesource.com/c/go/+/358118


Reviewed-by: default avatarAustin Clements <austin@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
parent 364f15ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment