Files
avo/tests/fixedbugs/issue76/issue76.s
Michael McLoughlin 57c23b967e pass: add PruneSelfMoves cleanup pass (#80)
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
2019-04-14 14:26:28 -07:00

12 lines
265 B
ArmAsm

// Code generated by command: go run asm.go -out issue76.s -stubs stub.go. DO NOT EDIT.
#include "textflag.h"
// func Issue76(x uint64, y uint64) uint64
TEXT ·Issue76(SB), NOSPLIT, $0-24
MOVQ x+0(FP), AX
MOVQ y+8(FP), CX
ADDQ CX, AX
MOVQ AX, ret+16(FP)
RET