From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8869 invoked by alias); 24 Mar 2011 14:47:19 -0000 Received: (qmail 8856 invoked by uid 22791); 24 Mar 2011 14:47:18 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_FC,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Mar 2011 14:47:12 +0000 Received: by wwj40 with SMTP id 40so48441wwj.8 for ; Thu, 24 Mar 2011 07:47:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.132.15 with SMTP id z15mr7770064wbs.218.1300978030844; Thu, 24 Mar 2011 07:47:10 -0700 (PDT) Received: by 10.227.64.142 with HTTP; Thu, 24 Mar 2011 07:47:10 -0700 (PDT) In-Reply-To: <20110324135021.GA28798@student94> References: <20110324114154.GB28413@student94> <20110324135021.GA28798@student94> Date: Thu, 24 Mar 2011 15:46:00 -0000 Message-ID: Subject: Re: Complex vectorization From: Richard Guenther To: gcc@gcc.gnu.org Cc: Simon Chopin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg00377.txt.bz2 On Thu, Mar 24, 2011 at 2:50 PM, Simon Chopin wrote: > On Thu, Mar 24, 2011 at 12:55:44PM +0100, Richard Guenther wrote: >> There are no vector of complex types and GCC internally does not handle >> this case as well. =A0Instead GCC lowers complex operations to > Yep, sorry, my mistake. I meant array of complex. >> piecewise scalar operations, thus vectorization would have vectors >> of the complex components. =A0There are a number of bugs in bugzilla >> for complex vectorization, like PR37021 or PR40770. > > And yet, when trying to multiply numbers, gcc says that complex isn't a > supported type. _Complex float should work. Complex is a c99 feature and requires you to include complex.h > From the links you provided, part of the solution would > be to associate the complex type and the vector type of its scalar type. > While it should work for most operations, providing support for the > IMAGPART_EXPR and REALPART_EXPR, the multiplication and division > operations are implemented as separated functions of libgcc. Because of > that, they wouldn't gain from the vectorization, or I am mistaken > (again) ? Multiplication is inlined for -fcx-fortran-rules for example. Yes, division is always out-of-line. Richard. > Cheers, > > Simon > > P.S. I am not aware of the list policy regarding the CCs, but I assumed > you were already subscribed. >