From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84840 invoked by alias); 6 Dec 2018 15:27:16 -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 84819 invoked by uid 89); 6 Dec 2018 15:27:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Dec 2018 15:27:13 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gUvYV-0005Xe-36 from Andrew_Stubbs@mentor.com ; Thu, 06 Dec 2018 07:27:11 -0800 Received: from [172.30.89.220] (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 6 Dec 2018 15:27:06 +0000 Subject: Re: [PATCH 10/10] Port testsuite to GCN To: Jeff Law , References: <2d4f15916d3fd76c3c125eca60a86f5be5b807c0.1542381960.git.ams@codesourcery.com> From: Andrew Stubbs Message-ID: Date: Thu, 06 Dec 2018 15:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-12/txt/msg00372.txt.bz2 I finally got back to investigating this .... On 21/11/2018 01:00, Jeff Law wrote: >> --- a/gcc/testsuite/gcc.dg/gimplefe-28.c >> +++ b/gcc/testsuite/gcc.dg/gimplefe-28.c >> @@ -1,5 +1,5 @@ >> /* { dg-do compile { target sqrt_insn } } */ >> -/* { dg-options "-fgimple -O2" } */ >> +/* { dg-options "-fgimple -O2 -ffast-math" } */ > So why does the GCN need fast-math here? I'm not aware of any other > target that needs that kind of handling to make this test work. It needs it because the sqrt instruction is only enabled when flag_unsafe_math_optimizations is set. This seems appropriate given the approximate nature of the machine instruction. This test uses gimple directly and so bypasses the usual optab checks that would normally select a library function instead, which results in an ICE. It seems like a safe change to make, since most targets will have more patterns enabled, not fewer, in this mode. The test will continue to fail on any target that does not have a sqrt instruction at all. Andrew