In some cases natural use of abstraction in avo programs can lead to redundant move instructions, specifically self-moves such as MOVQ AX, AX. This does not produce incorrect code but it is incorrect and inelegant. This diff introduces a PruneSelfMoves pass that removes such unnecessary instructions. Closes #76
5 lines
172 B
Go
5 lines
172 B
Go
// Package issue76 deliberately produces redundant MOV instructions.
|
|
//
|
|
// The intent is to confirm redundant self-move instructions are correctly removed.
|
|
package issue76
|