From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29128 invoked by alias); 29 Feb 2012 12:32:57 -0000 Received: (qmail 29115 invoked by uid 22791); 29 Feb 2012 12:32:56 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_TM 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; Wed, 29 Feb 2012 12:32:43 +0000 From: "evstupac at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52252] An opportunity for x86 gcc vectorizer (gain up to 3 times) Date: Wed, 29 Feb 2012 12:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: evstupac at gmail dot com 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" Content-Transfer-Encoding: quoted-printable 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-02/txt/msg02790.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52252 --- Comment #2 from Stupachenko Evgeny 2012-02-= 29 12:32:20 UTC --- The difference of 2 dumps from Arm: gcc -O3 -mfpu=3Dneon test.c -S -ftree-vectorizer-verbose=3D12 X86: gcc -O3 -m32 -msse3 test.c -S -ftree-vectorizer-verbose=3D12 Starts at: For Arm (can use vec_load_lanes): 6: =3D=3D=3D vect_make_slp_decision =3D=3D=3D=20 6: =3D=3D=3D vect_detect_hybrid_slp =3D=3D=3D 6: =3D=3D=3D vect_analyze_loop_operations =3D=3D=3D 6: examining phi: in_35 =3D PHI =E2=80=A6=E2=80=A6 6: can use vec_load_lanes=20 6: vect_model_load_cost: unaligned supported by hardware.=20 6: vect_model_load_cost: inside_cost =3D 2, outside_cost =3D 0 . For x86 (no array mode for V16QI[3]): 6: =3D=3D=3D vect_make_slp_decision =3D=3D=3D=20 6: =3D=3D=3D vect_detect_hybrid_slp =3D=3D=3D=20 6: =3D=3D=3D vect_analyze_loop_operations =3D=3D=3D=20 6: examining phi: in_35 =3D PHI =20 .=E2=80=A6=E2=80=A6 6: no array mode for V16QI[3]=20 6: the size of the group of strided accesses is not a power of 2=20 6: not vectorized: relevant stmt not supported: r_8 =3D *in_35;=20 As I mentioned before, there is an ability for x86 to handle this (Arm can shuffle than loads, x86 can use pshufb).