From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29094 invoked by alias); 24 Mar 2011 11:55:52 -0000 Received: (qmail 29085 invoked by uid 22791); 24 Mar 2011 11:55:52 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW 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 11:55:46 +0000 Received: by wwj40 with SMTP id 40so10464901wwj.8 for ; Thu, 24 Mar 2011 04:55:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.132.15 with SMTP id z15mr7580567wbs.218.1300967744987; Thu, 24 Mar 2011 04:55:44 -0700 (PDT) Received: by 10.227.64.142 with HTTP; Thu, 24 Mar 2011 04:55:44 -0700 (PDT) In-Reply-To: <20110324114154.GB28413@student94> References: <20110324114154.GB28413@student94> Date: Thu, 24 Mar 2011 12:53:00 -0000 Message-ID: Subject: Re: Complex vectorization From: Richard Guenther To: Simon Chopin Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00373.txt.bz2 On Thu, Mar 24, 2011 at 12:41 PM, Simon Chopin wrote: > Hi, > > I'm currently working on trying to implement a way to use the SIMD > instructions of the SSEx family when computing a vector of complex > numbers. > > I have to say that I have never worked on compilation techniques before, > and that I only have little understanding of the vectorization problems. > > I've spent a fait amount of time reading documentation and code, and I > came to the conclusion that, at least for the multiplication and > division of complex numbers, I had to implement them as functions in the > libgcc as their scalar counterpart, __mul*c3 and __div*c3. > > I face a couple of issues here : what are the C types corresponding to > the vector types, assuming they exist ? There are no vector of complex types and GCC internally does not handle this case as well. Instead GCC lowers complex operations to piecewise scalar operations, thus vectorization would have vectors of the complex components. There are a number of bugs in bugzilla for complex vectorization, like PR37021 or PR40770. Richard.