From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23580 invoked by alias); 3 May 2012 19:20:31 -0000 Received: (qmail 23567 invoked by uid 22791); 3 May 2012 19:20:30 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 May 2012 19:20:18 +0000 From: "marc.glisse at normalesup dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53101] Recognize casts to sub-vectors Date: Thu, 03 May 2012 19:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: marc.glisse at normalesup dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg00322.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53101 --- Comment #4 from Marc Glisse 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: 0 "register_operand") (mem: (match_dup 2)))] "TARGET_AVX" [(set (match_dup 0) (vec_select: (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.