1) DADD R1, R2, R3 2) DUSB R4, R5, R1 3) AND R6, R7, R4
1) S.D R1, 8(R2) 2) L.D R4, 16(R3)Is instruction 2 data dependent on instruction 1?
1) DADD R1, R2, R3 2) DADD R2, R4, R5
1) DADD R1, R2, R3 2) DADD R5, R1, R4 3) DADD R1, R6, R7
for (i=0; i<=999; i++) x[i] = x[i] + y[i];
x[0] = x[0] + y[0]; x[1] = x[1] + y[1]; x[2] = x[2] + y[2]; ...
if (p1) S1; if (p2) S2;S1 is control dependent on p1.
1) DADDU R2, R3, R4 2) BEQZ R4, skip 3) LW R1, 0(R2) 4) skip:Instruction 3 is not data dependent on instruction 2, but it cannot be moved above because it would change the exception behavior.
1) DADDU R1, R2, R3 2) BEQZ R12, skip 3) DSUBU R4, R5, R6 4) DADDU R5, R4, R9 5) skip: 6) OR R7, R8, R9Notice that R4 is used as a temporary variable.