1. Have a very long program compiled for 6014A with plenty of matrices and matrix assignments/manipulations.
Code: Select all
program assignments
const I9 as float[9] = (1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0)
dim matA,matB as float[9]
main:
matA = I9
matB = I9
goto main
end.
Code: Select all
;assignments.mbas,6 :: main:
;assignments.mbas,7 :: matA = I9
0x010E 0x208001 MOV #lo_addr(_matA), W1
0x0110 0x280000 MOV #lo_addr(_I9), W0
0x0112 0x090011 REPEAT #17
0x0114 0x7818B0 MOV [W0++], [W1++]
;assignments.mbas,8 :: matB = I9
0x0116 0x208241 MOV #lo_addr(_matB), W1
0x0118 0x090011 REPEAT #17
0x011A 0x7818B0 MOV [W0++], [W1++] <<< W0 should be pointing to @I9 but is now pointing @I9+#18 >>>
Code: Select all
;assignments.mbas,6 :: main:
;assignments.mbas,7 :: matA = I9
0x010E 0x208001 MOV #lo_addr(_matA), W1
0x0110 0x280000 MOV #lo_addr(_I9), W0
0x0112 0x090011 REPEAT #17
0x0114 0x7818B0 MOV [W0++], [W1++]
;assignments.mbas,8 :: matB = I9
0x0116 0x208241 MOV #lo_addr(_matB), W1
0x0118 0x280000 MOV #lo_addr(_I9), W0 <<< this statement was wrongly optimised out with opt 4 SSA >>>
0x011A 0x090011 REPEAT #17
0x011C 0x7818B0 MOV [W0++], [W1++]
5. The problem is independent of I9 being a constant or variable.