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, vectorizer] Fix PR tree-optimization/33854 ICE in vectorizable_conversion


Hi,

We determine loop vectorization factor according to the smallest data type
in the loop. We go through the statements in the loop and check the type of
their LHS. If the smallest data type in the loop is present only as the RHS
of a promotion operation, we should take into account the type of RHS as
well.

This patch adds FLOAT_EXPR to the list of such promotion operations.

In the testcase of PR 33854, vectorization factor of FLOAT_EXPR is
erroneously set according to the LHS type, causing the ICE.

Bootstrapped with vectorization enabled and tested on x86_64-linux.
O.K. for mainline?

Thanks,
Ira

ChangeLog:

      PR tree-optimization/33854
      * tree-vect-analyze.c (vect_determine_vectorization_factor): Add
      FLOAT_EXPR to the list of promotion operations.

testsuite/ChangeLog:

      PR tree-optimization/33854
      * gcc.dg/vect/O1-pr33854.c: New testcase.
      * gcc.dg/vect/vect.exp: Run tests starting with "O1-" with -O1.

(See attached file: pr33854.txt)

Attachment: pr33854.txt
Description: Text document


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