From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118719 invoked by alias); 12 May 2015 14:20:53 -0000 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 Received: (qmail 118669 invoked by uid 48); 12 May 2015 14:20:49 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56766] Fails to combine (vec_select (vec_concat ...)) to (vec_merge ...) Date: Tue, 12 May 2015 14:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg00983.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56766 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-05-12 CC| |uros at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Richard Biener --- The vectorizer patch is now in (I added a testcase for addsubps because for that it happens to work). We still need to fixup the sse3_addsubv2df3 pattern or fix combine to try multiple "canonical" forms of vec_merge vs. (vec_select (vec_concat ...)). Or decide which one is canonical (I'd prefer simply dropping vec_merge - with AVX512 we've run out of bits for the CONST_INT selector....) One issue with the vec_select form is that it requires an intermediate mode of double-size while vec_merge avoids this. Eventually one can also teach combine that certain (vec_select (vec_concat ..)) can be treated as (vec_merge ...). void testd (double * __restrict__ p, double * __restrict q) { p[0] = p[0] - q[0]; p[1] = p[1] + q[1]; } should vectorize to addsubpd with -msse3.