Hello,
I'm trying to optimize a small loop, but the compiler (version 7.3.1) is complaining about
a non qualified loop. I would like to understand why is this happening, if anyone can help. Here
is the loop:
for (i__ = 0; i__ < i__2; i__ += 4) { // Bucle a vectorizar (i__ += 4)
// Cargamos elementos de a
a_v = _dto128( _memd8_const( (void*) ptr_a ),
_memd8_const( (void*) (ptr_a + 2)) );
// Cargamos elementos de x
x_v = _dto128( _memd8_const((void*) ptr_x),
_memd8_const((void*) (ptr_x + 2) ) );
// Multiplicamos por temp y acumulamos
temp_vp = _qmpysp( x_v, temp_v2 );
temp_a_upper = _daddsp( _hif2_128( temp_vp ), _hif2_128( a_v ) );
temp_a_lower = _daddsp( _lof2_128( temp_vp ), _lof2_128( a_v ) );
*ptr_a = _lof2( temp_a_upper );
*(ptr_a+1) = _hif2( temp_a_upper );
*(ptr_a+2) = _lof2( temp_a_lower );
*(ptr_a+3) = _hif2( temp_a_lower );
ptr_a += 4;
ptr_x += 4;
}
And here is the fragment of the .asm file, if it helps:
$C$DW$L$my_sger_$4$E:
;*----------------------------------------------------------------------------*
;* SOFTWARE PIPELINE INFORMATION
;* Disqualified loop: Loop contains control code
;*----------------------------------------------------------------------------*
$C$L2:
$C$DW$L$my_sger_$5$B:
LDNDW .D1T1 *+A20(8),A5:A4 ; |62|
LDNDW .D1T1 *A20,A7:A6 ; |62|
LDNDW .D2T2 *+B10(8),B5:B4 ; |57|
LDNDW .D2T2 *B10,B9:B8 ; |57|
ADD .L1 4,A3,A3 ; |53|
CMPLT .L1 A3,A21,A0 ; |53|
QMPYSP .M1 A7:A6:A5:A4,A11:A10:A9:A8,A7:A6:A5:A4 ; |66|
NOP 3
DADDSP .L1X A7:A6,B9:B8,A7:A6 ; |71|
DADDSP .L2X A5:A4,B5:B4,B5:B4 ; |73|
|| [ A0] ADD .L1 4,A26,A4
|| [ A0] B .S1 $C$L5 ; |53|
[ A0] LDW .D1T1 *A4,A5
[ A0] B .S1 $C$L2
|| STW .D2T1 A6,*B10 ; |71|
STW .D2T2 B5,*+B10(12) ; |74|
STW .D2T2 B4,*+B10(8) ; |73|
STW .D2T1 A7,*+B10(4) ; |72|
|| ADDK .S2 16,B10 ; |76|
; BRANCHCC OCCURS {$C$L5} ; |53|
Can anybody help me with this? Thanks.
Fran