This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] vec_merge + vec_duplicate + vec_concat simplification
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Jun 2017 23:40:50 +0200 (CEST)
- Subject: Re: [PATCH] vec_merge + vec_duplicate + vec_concat simplification
- Authentication-results: sourceware.org; auth=none
- References: <5936693E.2050005@foss.arm.com>
- Reply-to: GCC Patches <gcc-patches at gcc dot gnu dot org>
On Tue, 6 Jun 2017, Kyrill Tkachov wrote:
Another vec_merge simplification that's missing is transforming:
(vec_merge (vec_duplicate x) (vec_concat (y) (z)) (const_int N))
into
(vec_concat x z) if N == 1 (0b01) or
(vec_concat y x) if N == 2 (0b10)
Do we have a canonicalization somewhere that guarantees we cannot get
(vec_merge (vec_concat (y) (z)) (vec_duplicate x) (const_int N))
?
I was wondering if it would be possible to merge the transformations for
concat and duplicate into a single one, but maybe it becomes too
unreadable.
--
Marc Glisse