From patchwork Sat Apr 23 13:33:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1621394 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=nyjO5QiY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Klsgm1YDhz9s0B for ; Sat, 23 Apr 2022 23:34:10 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B5FC9385625D for ; Sat, 23 Apr 2022 13:34:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5FC9385625D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1650720846; bh=x57ZdB9QLcy5EdOTLv+9J5sQSstnaUQCLau6PuLx+ks=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nyjO5QiY3JYB8mKg8VtgvoazTkcPW2v1kr/rl7K5EnW2nS1JzX2ST9lLdZUiCuk9q y+t1/Blgy4nGsM0jNCZBPSk6hvaELsOCXDGQAm4zA6Cf8gkF0ooVQ4/ECPQG2ntyaO Tuac12/EjjMyLZ5Btwwv0+Jfi1MovYVcW4oZoQpQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTPS id 9F0EE385780F for ; Sat, 23 Apr 2022 13:33:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9F0EE385780F Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 40881116270; Sat, 23 Apr 2022 09:33:46 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4k0ByDj-Gkp7; Sat, 23 Apr 2022 09:33:46 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id A2243116238; Sat, 23 Apr 2022 09:33:45 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 23NDXZkG2412560 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Apr 2022 10:33:36 -0300 To: Segher Boessenkool Subject: [PATCH] ppc: testsuite: float128-hw{,4}.c need -mlong-double-128 (was: [PATCH] ppc: testsuite: pr79004 needs -mlong-double-128) Organization: Free thinker, does not speak for AdaCore References: <20210412210424.GK26583@gate.crashing.org> Date: Sat, 23 Apr 2022 10:33:35 -0300 In-Reply-To: (Alexandre Oliva's message of "Thu, 14 Apr 2022 12:40:26 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alexandre Oliva via Gcc-patches From: Alexandre Oliva Reply-To: Alexandre Oliva Cc: gcc-patches@gcc.gnu.org, David Edelsohn Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" On Apr 14, 2022, Alexandre Oliva wrote: > * gcc.target/powerpr/pr79004.c: Add -mlong-double-128. Just like pr79004, float128-hw.c requires -mlong-double-128 for some the expected asm opcodes to be output on target variants that have 64-bit long doubles. That's because their expanders, e.g. floatsi2 for FLOAT128 modes, are conditioned on TARGET_LONG_DOUBLE_128, which is not set on target variants that use 64-bit long double. float128-hw4.c doesn't even compile without -mlong-double-128, on 64-bit long double target variants. The error is "invalid parameter combination for AltiVec intrinsic" in get_float128_exponent, get_float128_mantissa, and set_float128_exponent_float128, presumably caused by rs6000_builtin_type_compatible's refusal to consider _Float128 compatible when TARGET_LONG_DOUBLE_128 is not set. Since these are compile tests, -mlong-double-128 doesn't hurt even on target variants that use 64-bit long double, and enables both tests to pass. Tested on x86_64-linux-gnu x ppc64-vx7r2 with gcc-11. Ok to install? for gcc/testsuite/ChangeLog * gcc.target/powerpc/float128-hw.c: Add -mlong-double-128. * gcc.target/powerpc/float128-hw4.c: Likewise. --- gcc/testsuite/gcc.target/powerpc/float128-hw.c | 2 +- gcc/testsuite/gcc.target/powerpc/float128-hw4.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/float128-hw.c b/gcc/testsuite/gcc.target/powerpc/float128-hw.c index 8c9beafa90ad0..284d744c00978 100644 --- a/gcc/testsuite/gcc.target/powerpc/float128-hw.c +++ b/gcc/testsuite/gcc.target/powerpc/float128-hw.c @@ -1,7 +1,7 @@ /* { dg-do compile { target lp64 } } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-require-effective-target float128 } */ -/* { dg-options "-mpower9-vector -O2" } */ +/* { dg-options "-mpower9-vector -O2 -mlong-double-128" } */ #ifndef TYPE #define TYPE _Float128 diff --git a/gcc/testsuite/gcc.target/powerpc/float128-hw4.c b/gcc/testsuite/gcc.target/powerpc/float128-hw4.c index fc149169bc632..d86eadbcc7d06 100644 --- a/gcc/testsuite/gcc.target/powerpc/float128-hw4.c +++ b/gcc/testsuite/gcc.target/powerpc/float128-hw4.c @@ -1,7 +1,7 @@ /* { dg-do compile { target lp64 } } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-require-effective-target float128 } */ -/* { dg-options "-mpower9-vector -O2 -mabi=ieeelongdouble -Wno-psabi" } */ +/* { dg-options "-mpower9-vector -O2 -mlong-double-128 -mabi=ieeelongdouble -Wno-psabi" } */ /* Insure that the ISA 3.0 IEEE 128-bit floating point built-in functions can be used with long double when the default is IEEE 128-bit. */