This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50374] Support vectorization of min/max location pattern
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Sep 2011 12:10:28 +0000
- Subject: [Bug tree-optimization/50374] Support vectorization of min/max location pattern
- Auto-submitted: auto-generated
- References: <bug-50374-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50374
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #25320|0 |1
is obsolete| |
Attachment #25324|0 |1
is obsolete| |
Attachment #25325|0 |1
is obsolete| |
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-21 12:10:28 UTC ---
Created attachment 25331
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25331
gcc47-pr50374.patch
Updated patch, not very heavily tested yet.
The optabs stuff needs to change, because currently i?86 has 480 gen_reduc*loc*
expanders, that's way too much.
Thus I think it will be better to only iterate on the two modes, and pass
the comparison operator as another argument like we pass to vcond{,u}, from
which the expansion can determine what kind of comparison is supposed to happen
(signed vs. unsigned, min vs. max and first vs. last). I'll change it now.
Another thing is that this really ought to work even with -ftree-pre, having a
vectorization that requires users to disable PRE would be weird. I believe
there is one extra assignment, will look at that.
Then there is the question if ifcvt should, as richi asked, fold the COND_EXPR
into MIN/MAX and vectorizer be adjusted for that. Or, if we just should it
vectorize it using two VECT_COND_EXPRs instead (with the same condition).
Then, can also vectorize e.g. double comparisons, but only int indexes?