From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14595 invoked by alias); 6 Oct 2012 06:05:13 -0000 Received: (qmail 14579 invoked by uid 22791); 6 Oct 2012 06:05:11 -0000 X-SWARE-Spam-Status: No, hits=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Oct 2012 06:05:03 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q96652Ip008110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 6 Oct 2012 02:05:02 -0400 Received: from [10.3.113.153] (ovpn-113-153.phx2.redhat.com [10.3.113.153]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q96650Xw030794; Sat, 6 Oct 2012 02:05:01 -0400 Message-ID: <506FCA0C.6000704@redhat.com> Date: Sat, 06 Oct 2012 06:05:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Marc Glisse CC: gcc-patches@gcc.gnu.org Subject: Re: [C++] Mixed scalar-vector operations References: <506F5563.2070701@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg00601.txt.bz2 On 10/05/2012 07:09 PM, Marc Glisse wrote: > [LR]SHIFT_EXPR are special and also accept to have a vector as first > argument and a scalar as second argument (but not the reverse). Fair enough. > These 2 lines are in a switch in the case where scalar_to_vector > returned stv_firstarg, meaning that the first arg (op0) is a scalar that > needs to be converted to a vector of the same type as op1. Ah, I see. I just wasn't reading closely enough. > I think I should at least change the comment on scalar_to_vector from: > > /* Convert scalar to vector for the range of operations. */ > > to something like: > > /* Determine which of the operands, if any, is a scalar that needs to be > converted to a vector for the range of operations. */ > And add something in scalar_to_vector about the SHIFT_EXPRs. Makes sense. Jason