Tool/software: TI C/C++ Compiler
A customer observed NaN errors in a function operating on float numbers. He identified the location of this error and the related code is shown below.
;----------------------------------------------------------------------
; 57 | pEx->QualityParams->statesBuffer2[0] = z;
;----------------------------------------------------------------------
LDW .D1T2 *+A23[A17],B9 ; [A_D64P] |57| <0,44>
NOP 1 ; [A_L66]
.dwpsn file "../main.c",line 55,column 9,is_stmt,isa 0
FADDSP .L2 B9,B4,B4 ; [B_L66] |55| <0,46> ^
NOP 2 ; [A_L66]
FSUBSP .L2 B4,B5,B4 ; [B_L66] |55| <0,49> ^
|| ADDAD .D2 B9,15,B5 ; [B_D64P] |59| <0,49>
There's just one NOP between reading data into the B9 register using the LDW instruction and using the B9 register in FADDSP which doesn't match the required number of delay slots for the LDW instruction. This problem is seen in C6000 cgtools v8.1.3 and all other 8.1.x revisions up to v8.1.8. It only happens if compiler options -O2 or -O3 are used. The generated code is working as expected if using C6000 cgtools v8.2.0 or newer. Right now the customer is evaluating, if it's safe to switch to the newer compiler version (v8.2.x) even in a very late development stage of his project.
His basic question I couldn't answer so far: Is the compiler error described above known, and if that's the case, is it ensured this problem was fixed in the newer v8.2.x releases? I'm hoping that somebody from the compiler team will have the answer. If needed I can also provide test code which allows to reproduce the error.
Best regards,
Manfred