From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124046 invoked by alias); 25 Jun 2015 21:03:08 -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 123990 invoked by uid 48); 25 Jun 2015 21:03:04 -0000 From: "ramana at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/66675] New: Could improve vector bit_field_ref style optimizations. Date: Thu, 25 Jun 2015 21:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ramana at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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-06/txt/msg02567.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66675 Bug ID: 66675 Summary: Could improve vector bit_field_ref style optimizations. Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ramana at gcc dot gnu.org Target Milestone: --- This example #include int main(int argc, char *argv[]) { int8x8_t a = {argc, 1, 2, 3, 4, 5, 6, 7}; int8x8_t b = {0, 1, 2, 3, 4, 5, 6, 7}; int8x8_t c = vadd_s8(a, b); return c[0]; } or it's variant written in gcc vector speak generate pretty terrible code for AArch64 main: adr x1, .LC0 ld1 {v0.8b}, [x1] ins v0.b[0], w0 adr x0, .LC2 ld1 {v1.8b}, [x0] add v0.8b, v0.8b, v1.8b umov w0, v0.b[0] sxtb w0, w0 ret .size main, .-main This could well be folded down to a simple function that returns just argc. While this is a bit silly to expect in real life, it does show an interesting example.... regards Ramana