This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/57512] Vectorizer: cannot handle accumulation loop of signed char type


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]