From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11312 invoked by alias); 1 May 2012 17:18:03 -0000 Received: (qmail 11253 invoked by uid 22791); 1 May 2012 17:18:00 -0000 X-SWARE-Spam-Status: No, hits=-4.4 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; Tue, 01 May 2012 17:17:47 +0000 From: "marc.glisse at normalesup dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53101] Recognize casts to sub-vectors Date: Tue, 01 May 2012 17:18: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/msg00016.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53101 --- Comment #3 from Marc Glisse 2012-05-01 17:17:42 UTC --- (In reply to comment #2) > but operands[2] and operands[3] don't compare equal with rtx_equal_p, and > trying a match_dup refuses to compile because of the mode mismatch, so I don't > know how to constrain 2 and 3 to be "the same". rtx_equal_p (XEXP (operands[2], 0), XEXP (operands[3], 0)) seems to give the right answer in the 3 manual tests I did. Currently checking if the testsuite finds something. It is very likely not the right way to do it, but I didn't find any inspiring pattern in the .md files. Then I'll see if I understand how the fancy macros make it possible to have a single piece of code for all modes, and if instead of calling gen_vec_extract_lo_v8sf I shouldn't give a replacement pattern like (set (match_dup 0) (vec_select (match_dup 1) (const_int 0))).