From patchwork Mon Jan 22 17:55:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 125454 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1286123ljf; Mon, 22 Jan 2018 09:55:42 -0800 (PST) X-Google-Smtp-Source: AH8x226YnZlWgKoYN4dOdvVN5kuffQAc8zKzIU4xyhPwDfpgBEouD3LHf7i/CNGptVpNmxcAcFvj X-Received: by 10.107.137.157 with SMTP id t29mr8974511ioi.230.1516643742483; Mon, 22 Jan 2018 09:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516643742; cv=none; d=google.com; s=arc-20160816; b=i5I2OVMpeWnblK9UdM5Kio6B/oaVJgbAiS82gtwvGZ3t5Ayv6Npjs3bq4oqete+fsf 2MocwVdStOcLqo1xJGFhhunfwjUik5wCz9MOGpZ+thmDb0U5Xh7FISCnXKCerD9Cb51a gZEV7yIoKW7iO9JJ0Cdu5bB5t6Yv65LFh4l40L6e8QIm7kCMY3js5bEOxWen7troPfQt 3w8TnhyqmOVCgXUAClRIROnw4q7dBQ+PIeb4fdEyvptjl2/ZHu1lT1yqEu/BAHf5Sobw QN7QqRvIBZd0BsyfwQwHSPbonpVV3XdESeV+V5NJTz9NbNK3RGPqCuRgEGIEyQDsoEAa VZZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:date:subject:mail-followup-to:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=loVvThzAc4JENlYmSsTGlOEq3bzN9fHI17BmZQ+zCbk=; b=Rl7ztJcNz/M+RJ2ylO8eTyqyPy/rR9DCCMdOApSgBrTpNK62YPHTl3nBDzKqp1eDRM trYTWv/ipRZ7xGkLLMAtgABBu76tHoLyaZyJBmPT+VjfzUv7mCJ8x2XVmIXLirFD51EG qV9xGbdqboiWKqjutNWTW1CR64TXzwB034q24r/JnphiuOLeR0S4O5WATQhnQg84aaS0 SXXE4lK9X32I4ee9RnUqAiFgmL9z8wkWU5xL4ii79SxOOtVl6tuX2QoErWji+hnwvjyF PnIF8JMfqO/CkFAJpFBVaDeRzvXlWe+B7Mqt0BWofoM0iKUZIaVHmTXpVhD85vc24Zvu pfzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=oeGtWaBb; spf=pass (google.com: domain of gcc-patches-return-471815-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-471815-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id z89si6208047ita.9.2018.01.22.09.55.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 09:55:42 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-471815-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=oeGtWaBb; spf=pass (google.com: domain of gcc-patches-return-471815-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-471815-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=YCqnBtBEo/F1KzzvxKZwxKWY/12VMfrfxdRLIAs3ChdqbssNiq9JR ws3ags2PqBx5I5hQrCXGKhZffIttFp4ZJuojBq0lpzPQ5tVK483ET0wwsw70EOaY ous3Pn0ViAjXRrlI/hhqhD3jg85JfN0i43AUuBaf+YuXWIZ8Xz/ids= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=7Dlly9SSY9RF8hIGx9tLL17xDG0=; b=oeGtWaBbYkfYKzWvnk70 HrkxSNKJnymJvAvcz922w2NuXb+pDh2SW47/lNrsOpqjC4dDzRBr93gDO8MDx9Z0 bkpsde7ZcO1+W4F23tcXyClLZhSYzYQt7ZPduV15yTtdfZakf43gYQ6Kux9x74PE sD9lMMaMIEOKWkfKghRpP2Y= Received: (qmail 38874 invoked by alias); 22 Jan 2018 17:55:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 38863 invoked by uid 89); 22 Jan 2018 17:55:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=stdargh, UD:stdarg.h, tree-vect.h, vectreduc6c X-HELO: mail-wr0-f173.google.com Received: from mail-wr0-f173.google.com (HELO mail-wr0-f173.google.com) (209.85.128.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Jan 2018 17:55:29 +0000 Received: by mail-wr0-f173.google.com with SMTP id t16so9629031wrc.10 for ; Mon, 22 Jan 2018 09:55:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:mail-followup-to:subject:date:message-id :user-agent:mime-version; bh=loVvThzAc4JENlYmSsTGlOEq3bzN9fHI17BmZQ+zCbk=; b=slBIHJqdVUlUznKK+v3pj01wG0z2vnab9XtUV52vDb7QXhul5t8PgrCE5gz9Q2noo8 35DzJBPritgdLBzZv/cc6FPPknRg871vSqufxk9GdgY5bw9cZf40WzSNPcOrSauuQvl0 ByK0toxTXjil23+/DUaK71C4ErVaNEgjJFDJsT+qix9Z1ezfkrMYov24IBd8ymcEWY7S JqIMOCY3f+xHT0fGOCyeZ3RZ+DT5SFZw9V6hlT/AHild6Ldlc9TfJg3SQztVMQb7mOzv 9XMRVc38RZdSt/Bmao9CJAFbKguSGLX2beISX6rsg6QSTqyl9ytaECy9AHOpN/YB/ljp JKaA== X-Gm-Message-State: AKwxyteatD4IwucElB36aRe1rs2Vscl/AGXpS0bEqVWH6xOYRBd7z5N9 n3bt7fUSfL6NNgr64AiDL0/noCh7XYY= X-Received: by 10.223.130.194 with SMTP id 60mr7225524wrc.72.1516643726845; Mon, 22 Jan 2018 09:55:26 -0800 (PST) Received: from localhost (188.29.164.244.threembb.co.uk. [188.29.164.244]) by smtp.gmail.com with ESMTPSA id i8sm10892777wra.97.2018.01.22.09.55.25 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 09:55:26 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Fix vect_float markup for a couple of tests (PR 83888) Date: Mon, 22 Jan 2018 17:55:24 +0000 Message-ID: <87wp09ok1f.fsf@linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 vect_float is true for arm*-*-* targets, but the support is only available when -funsafe-math-optimizations is on. This caused failures in two tests that disable fast-math. The easiest fix seemed to be to add a new target selector for "vect_float without special options". Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. OK to install? Richard 2018-01-22 Richard Sandiford gcc/ PR testsuite/83888 * doc/sourcebuild.texi (vect_float): Say that the selector only describes the situation when -funsafe-math-optimizations is on. (vect_float_strict): Document. gcc/testsuite/ PR testsuite/83888 * lib/target-supports.exp (check_effective_target_vect_float): Say that the result only holds when -funsafe-math-optimizations is on. (check_effective_target_vect_float_strict): New procedure. * gcc.dg/vect/no-fast-math-vect16.c: Use vect_float_strict instead of vect_float. * gcc.dg/vect/vect-reduc-6.c: Likewise. Index: gcc/doc/sourcebuild.texi =================================================================== --- gcc/doc/sourcebuild.texi 2018-01-22 17:51:03.860579049 +0000 +++ gcc/doc/sourcebuild.texi 2018-01-22 17:54:02.172848564 +0000 @@ -1403,7 +1403,13 @@ The target's preferred vector alignment alignment. @item vect_float -Target supports hardware vectors of @code{float}. +Target supports hardware vectors of @code{float} when +@option{-funsafe-math-optimizations} is in effect. + +@item vect_float_strict +Target supports hardware vectors of @code{float} when +@option{-funsafe-math-optimizations} is not in effect. +This implies @code{vect_float}. @item vect_int Target supports hardware vectors of @code{int}. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp 2018-01-22 17:51:03.817580787 +0000 +++ gcc/testsuite/lib/target-supports.exp 2018-01-22 17:54:02.173848531 +0000 @@ -5492,7 +5492,8 @@ proc check_effective_target_vect_long { return $answer } -# Return 1 if the target supports hardware vectors of float, 0 otherwise. +# Return 1 if the target supports hardware vectors of float when +# -funsafe-math-optimizations is enabled, 0 otherwise. # # This won't change for different subtargets so cache the result. @@ -5525,6 +5526,14 @@ proc check_effective_target_vect_float { return $et_vect_float_saved($et_index) } +# Return 1 if the target supports hardware vectors of float without +# -funsafe-math-optimizations being enabled, 0 otherwise. + +proc check_effective_target_vect_float_strict { } { + return [expr { [check_effective_target_vect_float] + && ![istarget arm*-*-*] }] +} + # Return 1 if the target supports hardware vectors of double, 0 otherwise. # # This won't change for different subtargets so cache the result. Index: gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c =================================================================== --- gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c 2018-01-13 18:01:15.293116922 +0000 +++ gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c 2018-01-22 17:54:02.172848564 +0000 @@ -1,4 +1,4 @@ -/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_float_strict } */ #include #include "tree-vect.h" Index: gcc/testsuite/gcc.dg/vect/vect-reduc-6.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-reduc-6.c 2018-01-13 18:01:15.294116882 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-reduc-6.c 2018-01-22 17:54:02.172848564 +0000 @@ -1,4 +1,4 @@ -/* { dg-require-effective-target vect_float } */ +/* { dg-require-effective-target vect_float_strict } */ /* { dg-additional-options "-fno-fast-math" } */ #include