From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4111 invoked by alias); 22 Mar 2011 16:52:53 -0000 Received: (qmail 3990 invoked by uid 22791); 22 Mar 2011 16:52:50 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f47.google.com (HELO mail-bw0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 16:52:40 +0000 Received: by bwz10 with SMTP id 10so6187992bwz.20 for ; Tue, 22 Mar 2011 09:52:38 -0700 (PDT) Received: by 10.204.126.227 with SMTP id d35mr306771bks.122.1300812757833; Tue, 22 Mar 2011 09:52:37 -0700 (PDT) Received: from richards-thinkpad (gbibp9ph1--blueice3n2.emea.ibm.com [195.212.29.84]) by mx.google.com with ESMTPS id c11sm5275398bkc.2.2011.03.22.09.52.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Mar 2011 09:52:36 -0700 (PDT) From: Richard Sandiford To: gcc@gcc.gnu.org Mail-Followup-To: gcc@gcc.gnu.org, richard.sandiford@linaro.org Subject: RFC: Representing vector lane load/store operations Date: Tue, 22 Mar 2011 16:52:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00322.txt.bz2 This is an RFC about adding gimple and optab support for things like ARM's load-lane and store-lane instructions. It builds on an earlier discussion between Ira and Julian, with the aim of allowing these instructions to be used by the vectoriser. These instructions operate on N vector registers of M elements each and on a sequence of 1 or M N-element structures. They come in three forms: - full load/store: 0<=I RGB RGB RGB RGB - lane load/store: given L, 0<=I RGB - load-and-duplicate: 0<=I __builtin_store_lanes (VECTORS : array N of vector M of X) returns array N*M of X maps to vstN on ARM in practice, the argument would be populated by assignments of the form: ARRAY_REF = vectorY __builtin_load_lane (REF : array N of X, VECTORS : array N of vector M of X, LANE : integer) returns array N of vector M of X maps to vldN_lane on ARM __builtin_store_lane (VECTORS : array N of vector M of X, LANE : integer) returns array N of X maps to vstN_lane on ARM __builtin_load_dup (REF : array N of X) returns array N of vector M of X maps to vldN_dup on ARM I've hacked up a prototype of this and it seems to produce good code. What do you think? Richard