From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26191 invoked by alias); 13 Jul 2012 14:06:41 -0000 Received: (qmail 26180 invoked by uid 22791); 13 Jul 2012 14:06:39 -0000 X-SWARE-Spam-Status: No, hits=-4.3 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; Fri, 13 Jul 2012 14:06:23 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/26128] Trivial operation not vectorized on char/short Date: Fri, 13 Jul 2012 14:06: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: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.5.0 X-Bugzilla-Changed-Fields: Status Known to work Resolution Target Milestone Known to fail 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-07/txt/msg01062.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26128 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Known to work| |4.5.4, 4.8.0 Resolution| |FIXED Target Milestone|--- |4.5.0 Known to fail| |4.4.6 --- Comment #6 from Richard Guenther 2012-07-13 14:05:50 UTC --- Making the testcase actually compile like char a[16] __attribute__((aligned(16))) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; char b[16] __attribute__((aligned(16))) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; char c[16] __attribute__((aligned(16))); int main() { int i; for(i = 0; i<16; i++) { c[i] = a[i] + b[i]; } for(i = 0; i<16; i++) { printf("%i ", c[i]); } } shows: c> /space/rguenther/install/gcc-4.5.4/bin/gcc -O3 t.c -ftree-vectorizer-verbose=1 t.c: In function 'main': t.c:18:7: warning: incompatible implicit declaration of built-in function 'printf' t.c:11: note: LOOP VECTORIZED. t.c:7: note: vectorized 1 loops in function. Thus fixed, in GCC 4.5.