From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17951 invoked by alias); 30 Mar 2008 12:00:09 -0000 Received: (qmail 17943 invoked by uid 22791); 30 Mar 2008 12:00:08 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.31) with SMTP; Sun, 30 Mar 2008 11:59:41 +0000 Received: (qmail invoked by alias); 30 Mar 2008 11:59:38 -0000 Received: from p5087FB16.dip.t-dialin.net (EHLO burns.bruehl.pontohonk.de) [80.135.251.22] by mail.gmx.net (mp009) with SMTP; 30 Mar 2008 13:59:38 +0200 X-Authenticated: #1174187 From: Christoph Bartoschek To: gcc-help@gcc.gnu.org Subject: Auto-vectorization of dot-product Date: Sun, 30 Mar 2008 12:00:00 -0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803301401.59786.bartoschek@gmx.de> X-Y-GMX-Trusted: 0 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00312.txt.bz2 Hi, I have a simple implementation of a dot-product: inline double dot(int dim, double const * __restrict x, double const * __restrict y) { double sum = 0.0; for (int i = 0; i < dim; ++i) { sum += x[i] * y[i]; } return sum; } Although the Auto-vectorization site http://gcc.gnu.org/projects/tree-ssa/vectorization.html mentions that GCC supports auto-vectorization of the dot-product, I get the following information from GCC 4.3 dot.C:63: note: not vectorized: unsupported use in stmt. Other simpler loops get vectorized. What could be wrong? Christoph