This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...)
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Jun 2015 11:14:22 +0000
- Subject: [Bug rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...)
- Auto-submitted: auto-generated
- References: <bug-56766-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56766
--- Comment #12 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 11 Jun 2015, ubizjak at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56766
>
> --- Comment #11 from UroÅ Bizjak <ubizjak at gmail dot com> ---
> (In reply to Richard Biener from comment #10)
> > So it works with
> >
> > (define_insn "sse3_addsubv2df3"
> > [(set (match_operand:V2DF 0 "register_operand" "=x,x")
> > (vec_select:V2DF
> > (vec_concat:V4DF
> > (plus:V2DF
> > (match_operand:V2DF 1 "register_operand" "0,x")
> > (match_operand:V2DF 2 "nonimmediate_operand" "xm,xm"))
> > (minus:V2DF (match_dup 2) (match_dup 1)))
> > (parallel [(const_int 0) (const_int 3)])))]
>
> You swapped non-commutative part of the insn. This should be:
>
> (define_insn "*sse3_addsubv2df3_1"
> [(set (match_operand:V2DF 0 "register_operand" "=x,x")
> (vec_select:V2DF
> (vec_concat:V4DF
> (plus:V2DF
> (match_operand:V2DF 2 "nonimmediate_operand" "xm,xm")
> (match_operand:V2DF 1 "register_operand" "0,x"))
> (minus:V2DF (match_dup 1) (match_dup 2)))
> (parallel [(const_int 0) (const_int 3)])))]
> "TARGET_SSE3"
As it is just 'naming' it shouldn't matter, no?