From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50518 invoked by alias); 23 Nov 2017 12:16:20 -0000 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 Received: (qmail 50509 invoked by uid 89); 23 Nov 2017 12:16:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_1,KAM_NUMSUBJECT,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Nov 2017 12:16:18 +0000 Received: by mail-wm0-f48.google.com with SMTP id x63so16090404wmf.4 for ; Thu, 23 Nov 2017 04:16:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Zp42nMRoMOEImM51wQxFA7Qex5zs+LH732B64sK+sAM=; b=gFebnDt8+3QTwieXmn/1Rk3TCR3lcb713x8VNwKB2BcXrS9hVVtTOVc5b4tTmPWh5X AxJzKi12JO7QEDmXeqBZ5yBIyQU433gBVTyynrtCpdS1D9w59xOYMp5RAGr1my9g0p4W HbaAeJbztKzu8YVbhneh2SgTjGYgwpXkKBcy1oU3b5/2tnzccYGbgrdB16Fat8AdUgW8 C5a5JqE9VNocU6oPpuIoeuglD8vF1ee+nNQLU2U/BzwkjOd0iUexDrnVemCh0nx8TTIu LWq1bQA5kvPDjPrJnEEDV7WjfnRUnyyqKBtD6UuSzMLisoJ0WX45dGo60M6POWmlm/RI 50tg== X-Gm-Message-State: AJaThX7ITu/8EvY9/guToWvwIul8mLsRwFZO1LatjG+vj8MDHlT3IJqM vuwwMe1gbS7eJigNxbROZyRTRwkZs8zI6ZL+1og= X-Google-Smtp-Source: AGs4zMbOv2PtU6EH2hgkj2xpv9zt81lscCqnUxrykNJpj1EuB96EjW1ALBFq8k+MFUuFN0PduPGmNNjOO4L7oTokfGk= X-Received: by 10.80.208.195 with SMTP id g3mr34026861edf.246.1511439376759; Thu, 23 Nov 2017 04:16:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.143.34 with HTTP; Thu, 23 Nov 2017 04:16:16 -0800 (PST) In-Reply-To: <2E74E2B4-E89F-4B6E-95DB-8733A912AF2C@arm.com> References: <87d14brhj6.fsf@uclouvain.be> <87zi7fbn07.fsf@uclouvain.be> <87wp2ib6aj.fsf@uclouvain.be> <2E74E2B4-E89F-4B6E-95DB-8733A912AF2C@arm.com> From: Richard Biener Date: Thu, 23 Nov 2017 12:39:00 -0000 Message-ID: Subject: Re: [PATCH] Fix result for conditional reductions matching at index 0 To: Alan Hayward Cc: Kilian Verhetsel , GCC Patches , nd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg02124.txt.bz2 On Thu, Nov 23, 2017 at 10:51 AM, Alan Hayward wrote: > >> On 22 Nov 2017, at 16:57, Kilian Verhetsel wrote: >> >> >> Thank you both for your comments. >> >> I have added the check to ensure the index vector won't cause an >> overflow. I also added tests to the testsuite in order to check that the >> loop is vectorized for UINT_MAX - 1 iterations but not UINT_MAX >> iterations. I was not able to write code that triggers >> INTEGER_INDUC_COND_REDUCTION when using char or other smaller types >> (changing the types of last, min_v and a to something else causes >> COND_REDUCTION to be used instead), so these tests are only compiled and >> not executed. > > I had similar problems when playing around with -14.c, but didn=E2=80=99t= have chance to > investigate why. Possibly worth raising a bug to mentioning there is a mi= ssed > optimisation. It=E2=80=99d be nice to figure out why. > >> >> I also moved an instruction that generates a vector of zeroes (used for >> COND_REDUCTION) in the branch of code run only for COND_REDUCTION, this >> should remove the unused vector that Alan noticed. > > Patch is ok for me. Fine with me as well. Thanks for taking care of this bug. Richard. > > Alan. >