I'm using code generation toolset v6.1.6 (Linux version) to compile the following code:
void function_x(uint32* restrict pui_dst,
uint32* restrict pui_hyp_buf,
uint32 ui_l)
{
uint32 ui_i;
if ( ui_l == 0 )
{
/*
* TI: for some unknown reason we have to disable unrolling of this loop
* when compiling with CGT6.1.6 (Linux), otherwise we get the following:
* "Optimizer terminated abnormally"
*/
#pragma UNROLL( 1 );
for ( ui_i = 0 ; ui_i < 16 ; ui_i++ )
{
pui_dst[ui_i] = _dotp2(pui_hyp_buf[ui_i], pui_hyp_buf[ui_i]);
}
}
else
{
for ( ui_i = 0 ; ui_i < 16 ; ui_i++ )
{
pui_dst[ui_i] += _dotp2(pui_hyp_buf[ui_i], pui_hyp_buf[ui_i]);
}
}
}
As stated in the code comment above, this will not compile unless unrolling of the first loop is disabled, otherwise the compiler aborts with the following:
>>>> Optimizer terminated abnormally
>>>> in function _function_x()
>>>> in file "myfile.c"
Compiler options used are:
--opt_level=2 --define=CHIP_6416 --silicon_version=6400
Can anyone tell me why this will not compile/optimize?