From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84844 invoked by alias); 22 Sep 2015 17:21:57 -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 84785 invoked by uid 48); 22 Sep 2015 17:21:53 -0000 From: "alalaw01 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67683] New: Missed vectorization: shifts of an induction variable Date: Tue, 22 Sep 2015 17:21: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: 6.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: alalaw01 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 keywords bug_severity priority component assigned_to reporter blocked 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-09/txt/msg01801.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67683 Bug ID: 67683 Summary: Missed vectorization: shifts of an induction variable Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: alalaw01 at gcc dot gnu.org Blocks: 53947 Target Milestone: --- This testcase: void test (unsigned char *data, int max) { unsigned short val = 0xcdef; for(int i = 0; i < max; i++) { data[i] = (unsigned char)(val & 0xff); val >>= 1; } } does not vectorize on AArch64 or x86_64 at -O3. (I haven't yet looked at whether it's a mid-end deficiency or both back-ends are missing patterns.) Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations