This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/53101] Recognize casts to sub-vectors
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 May 2012 19:19:00 +0000
- Subject: [Bug target/53101] Recognize casts to sub-vectors
- Auto-submitted: auto-generated
- References: <bug-53101-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53101
--- Comment #4 from Marc Glisse <marc.glisse at normalesup dot org> 2012-05-03 19:19:00 UTC ---
(define_peephole2
[(set (mem:VI8F_256 (match_operand 2))
(match_operand:VI8F_256 1 "register_operand"))
(set (match_operand:<ssehalfvecmode> 0 "register_operand")
(mem:<ssehalfvecmode> (match_dup 2)))]
"TARGET_AVX"
[(set (match_dup 0)
(vec_select:<ssehalfvecmode> (match_dup 1)
(parallel [(const_int 0) (const_int
1)])))]
)
(and similar for VI4F_256) is much less hackish than the XEXP stuff. I was
quite sure I'd tested exactly this and it didn't work, but now it looks like it
does :-/
Except that following http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00197.html ,
this is not the right place to try and add such logic. That's a good thing
because it is way too fragile, another instruction can easily squeeze between
the two sets and disable the peephole.