This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/57512] Vectorizer: cannot handle accumulation loop of signed char type
- From: "congh at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Dec 2013 23:13:55 +0000
- Subject: [Bug tree-optimization/57512] Vectorizer: cannot handle accumulation loop of signed char type
- Auto-submitted: auto-generated
- References: <bug-57512-4 at http dot gcc dot gnu dot org/bugzilla/>
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.