This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/54346] New: combine permutations
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Aug 2012 14:02:09 +0000
- Subject: [Bug tree-optimization/54346] New: combine permutations
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54346
Bug #: 54346
Summary: combine permutations
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: glisse@gcc.gnu.org
Hello,
when we have two VEC_PERM_EXPR with constant mask, where one is the only user
of the result of the other one, it would be good to compose/merge them into a
single VEC_PERM_EXPR. However, it is too hard for backends to always generate
optimal code for shuffles, so we want to do the optimization only if we know it
actually helps. Currently this means when the composed permutation is the
identity. In the future, it could mean asking the backend.
See the conversation that started at:
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00676.html
and around this message for cost hooks (which could also help the vectorizer):
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00973.html
Related bug is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43147 but that one
is about RTL (unless x86 eventually follows ARM and decides to implement _mm_*
functions in terms of __builtin_shuffle).