From patchwork Sun Jun 30 11:29:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Sayle X-Patchwork-Id: 1954323 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nextmovesoftware.com header.i=@nextmovesoftware.com header.a=rsa-sha256 header.s=default header.b=MZKrfFaQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WBn5p3Ls9z1xpP for ; Sun, 30 Jun 2024 21:30:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1EA1F385DDDF for ; Sun, 30 Jun 2024 11:30:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [69.48.154.134]) by sourceware.org (Postfix) with ESMTPS id A056C3858C39 for ; Sun, 30 Jun 2024 11:29:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A056C3858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A056C3858C39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=69.48.154.134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719746982; cv=none; b=FvaUUgmD8W1CxysLE7IYPosQ+aX8FRNVLixADXLic+yRdzTJHAzdeW0NLV7JkYX9OnWgu4aMGbH3cGIMbzbt1QUXt/9unjInTjSEf1UCm+0R3AVWUU+z9JUxuGEYUb59UTVxh2aqd4JR4RZXd0asCNCFhOMj71/5ABHQ6KzUBdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719746982; c=relaxed/simple; bh=zJnSc0WKxnDwAAu6zgzqFRsXygEcME1fuDx/UF5gDRQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=o/ZZIXY+MYwhTgfsgWmdqnf+iU+gGF0/S4aLZrYLA3oz+shGUQQetn8HOIUp04ZT0JH3AKSp/SwoI/kT9ES2MG41t5AKod10pnnsbu8U2yP860yCRszyj3bAldDbFbJTVlt9v06MsKnDJ4HhsCGm/Cqi/fmAFqZLiqMl2gz5Z2w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Lwrm3oBVKiuzF1cfpcabDWZHkcczpXC58EBIlAhdG38=; b=MZKrfFaQ7c8vhJJa+So57qQ7lP QmIuSKxk26IkPCQuGpmus6yGtmoKjOSe5tPh1FvqLiDCVXZwlnxUHu/TpQGK3j+v85aFCPmKtx1Nf qR/gBx2nBFmoyAI30zfK+Fx3VF9oTGuIOnDdrmct/1prgcbzyOxkZy7KK52klBtDzcOP6gZ++fkqK r8oHK3X5i5ZTZweeMZ43gtj0zBfkbr2JOwFWbyJZzJHa+J5asoj8zs9mSFJ9TGhXRQTtV2b5nx2+z fExqQTblTBy1VoYf0/v0Pywc2mV2jJw63VOCKOmZAFa+Ra4BuUua3Z0rXRX5rXsIjSG6z97zEIFWm aPj1gimg==; Received: from [168.86.198.82] (port=57290 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1sNskW-00000003DmU-03NW; Sun, 30 Jun 2024 07:29:40 -0400 From: "Roger Sayle" To: Cc: "'Hongtao Liu'" Subject: [testsuite PATCH] Fix -m32 gcc.target/i386/pr102464-vrndscaleph.c on RedHat. Date: Sun, 30 Jun 2024 12:29:36 +0100 Message-ID: <004601dacae0$cb222ab0$61668010$@nextmovesoftware.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdrK4G4D+DQ+owXCQsqfsr4bDr9sRg== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org This patch fixes the 4 FAILs of gcc.target/i386/pr192464-vrndscaleph.c with --target_board='unix{-m32}' on RedHat 7.x. The issue is that this AVX512 test includes the system math.h, and on older systems this provides inline versions of floor, ceil and rint (for the 387). The work around is to define __NO_MATH_INLINES before #include (or alternatively use __builtin_floor, __builtin_ceil, etc.). This patch has been tested on x86_64-pc-linux-gnu with make -k check, with and without --target_board=unix{-m32}. Ok for mainline? 2024-06-30 Roger Sayle gcc/testsuite/ChangeLog PR middle-end/102464 * gcc.target/i386/pr102464-vrndscaleph.c: Define __NO_MATH_INLINES to resovle FAILs with -m32 on older RedHat systems. Thanks in advance, Roger diff --git a/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c b/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c index a76d9e7..9eb8124 100644 --- a/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c +++ b/gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c @@ -1,6 +1,9 @@ /* PR target/102464. */ /* { dg-do compile } */ /* { dg-options "-Ofast -mavx512fp16 -mavx512vl -mprefer-vector-width=512" } */ +#ifndef __NO_MATH_INLINES +#define __NO_MATH_INLINES +#endif #include void foo (_Float16* __restrict a, _Float16* b)