This is the mail archive of the gcc-patches@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]

[patch] for PR 25918 (autovect)





Hello,

:ADDPATCH TESTSUITE/autovect:

1. ia64 supports non-widening multiplication of shorts.  This,
in combination of being able to support widen_ssumv4hi3, causes to
vectorize the loop in testcase vect-reduc-dot-s16.c even though it is
not recognized as a dot-product pattern.  The testcase is fixed to expect
exactly that.  To do that, we split the testcase - the one loop is expected
to be vectorized, as before, for vect_sdot_hi targets, and the other loop
is expected to be vectorized for targets that support both vect_short_mult
and vect_widen_sum_hi_to_si - new keywords added to target-support.exp.

2. ia64 doesn't support "char-to-int" type of widen sum. This causes the
following case (in the testcase vect-reduc-pattern-2.c) to be unrecognized
as widenning summation on ia64 by vectorizer:

  char data[];
  short sum;

  for (i = 0; i < N; i++){
    sum += data[i];
  }

To fix this we replace the vect_widen_sum keyword with finer
keywords (vect_widen_sum_qi_to_hi, vect_widen_sum_qi_to_si,
vect_widen_sum_hi_to_si), and split the testcase vect-reduc-pattern-1.c
and vect-reduc-pattern-2.c into separate testcases.

This patch changes the above testcases to make the dg-final checks
more precise.

Regtested on ppc64-yellowdog-linux and ia64

Thanks to Jim Wilson for analyzing the problem and testing on ia64.

-- victor

2006-02-12  Victor Kaplansky  <victork@il.ibm.com>

        PR tree-opt/25918
        * lib/target-supports.exp
        (check_effective_target_vect_short_mult): New.
        (check_effective_target_vect_char_mult): New.
        (check_effective_target_vect_widen_sum_qi_to_si): New.
        (check_effective_target_vect_widen_sum_qi_to_hi): New.
        (check_effective_target_vect_widen_sum_hi_to_si): New.
        * gcc.dg/vect/vect-reduc-dot-s16.c: Remove, split into
        vect-reduc-dot-s16a.c and vect-reduc-dot-s16b.c
        * vect-reduc-dot-s16a.c: New, split from vect-reduc-dot-s16.c.
        * vect-reduc-dot-s16b.c: New, split from vect-reduc-dot-s16.c.
        * gcc.dg/vect/vect-reduc-pattern-2.c: Remove, split into
        vect-reduc-pattern-2a.c, vect-reduc-pattern-2b.c and
        vect-reduc-pattern-2c.c
        * gcc.dg/vect/vect-reduc-pattern-1.c: Remove, split into
        vect-reduc-pattern-1a.c, vect-reduc-pattern-1b.c and
        vect-reduc-pattern-1c.c
(See attached file: mainline.PR25918-3.patch.txt)

Attachment: mainline.PR25918-3.patch.txt
Description: Text document


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