1a.
ADD R3, R3, R3
BEQ 110
ADD R0, R1, R2
1b.
JUMP 110
ADD R0, R1, R2
1c.
can't be improved because we need the result of the ADD to be able to decide whether or not to branch for the BEQ.


2a.

LOAD 500, R3
LOAD 502, R2
ADD R3, R3, R3
ADD R2, R2, R2
2b.
LOAD 500, R1
LOAD 502, R2
NOP
ADD R1, R2, R3
2c.
ADD R0, R1, R2
ADD R0, R2, R3
(in 2c, the LOAD instruction did nothing of consequence because R3 was overwritten before any use)


[CSC 258 additional problems] [main course page]