http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57512
Cong Hou <congh at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |congh at google dot com
--- Comment #2 from Cong Hou <congh at google dot com> ---
Together with the phi function, consider the following gimple code:
loop:
# sum_phi = phi (sum_signed, sum_init_signed);
sum_temp = (short unsigned int) sum_phi;
sum_unsigned = a + sum_temp;
sum_signed = (short int) sum_unsigned;
Can we transform the above code to the following one?
sum_init_unsigned = (unsigned short int) sum_init_signed;
loop:
# sum_phi = phi (sum_unsigned, sum_init_unsigned);
sum_unsigned = a + sum_phi;
sum_signed = (short int) sum_unsigned;
This transformation should let the vectorizer detect the reduction pattern.