public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Peter Bergner <bergner@linux.ibm.com>,
	Michael Meissner <meissner@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>,
	Andrew MacLeod <amacleod@redhat.com>,
	"hernandez, aldy" <aldyh@redhat.com>
Subject: [PATCH 3/4] ranger: Revert the workaround introduced in PR112788 [PR112993]
Date: Wed, 8 May 2024 13:32:52 +0800	[thread overview]
Message-ID: <79b24bb3-f5b7-5ada-ca84-a1deda04df83@linux.ibm.com> (raw)
In-Reply-To: <813e8433-0428-1854-c82c-fc0743368fa8@linux.ibm.com>

Hi,

This reverts commit r14-6478-gfda8e2f8292a90 "range:
Workaround different type precision between _Float128 and
long double [PR112788]" as the fixes for PR112993 make
all 128 bits scalar floating point have the same 128 bit
precision, this workaround isn't needed any more.

Bootstrapped and regress-tested on:
  - powerpc64-linux-gnu P8/P9 (with ibm128 by default)
  - powerpc64le-linux-gnu P9/P10 (with ibm128 by default)
  - powerpc64le-linux-gnu P9 (with ieee128 by default)

Is it OK for trunk if {1,2}/4 in this series get landed?

BR,
Kewen
-----

	PR target/112993

gcc/ChangeLog:

	* value-range.h (range_compatible_p): Remove the workaround on
	different type precision between _Float128 and long double.
---
 gcc/value-range.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/gcc/value-range.h b/gcc/value-range.h
index 9531df56988..39de7daf3d9 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -1558,13 +1558,7 @@ range_compatible_p (tree type1, tree type2)
   // types_compatible_p requires conversion in both directions to be useless.
   // GIMPLE only requires a cast one way in order to be compatible.
   // Ranges really only need the sign and precision to be the same.
-  return TYPE_SIGN (type1) == TYPE_SIGN (type2)
-	 && (TYPE_PRECISION (type1) == TYPE_PRECISION (type2)
-	     // FIXME: As PR112788 shows, for now on rs6000 _Float128 has
-	     // type precision 128 while long double has type precision 127
-	     // but both have the same mode so their precision is actually
-	     // the same, workaround it temporarily.
-	     || (SCALAR_FLOAT_TYPE_P (type1)
-		 && TYPE_MODE (type1) == TYPE_MODE (type2)));
+  return (TYPE_PRECISION (type1) == TYPE_PRECISION (type2)
+	  && TYPE_SIGN (type1) == TYPE_SIGN (type2));
 }
 #endif // GCC_VALUE_RANGE_H
--
2.39.1

  parent reply	other threads:[~2024-05-08  5:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  5:21 [PATCH 1/4] rs6000: Make all 128 bit scalar FP modes have 128 bit precision [PR112993] Kewen.Lin
2024-05-08  5:27 ` [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993] Kewen.Lin
2024-05-08  7:40   ` Mikael Morin
2024-05-08 22:01   ` [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993]g Steve Kargl
2024-05-09  5:37     ` Kewen.Lin
2024-05-09 16:47       ` Steve Kargl
2024-05-08  5:32 ` Kewen.Lin [this message]
2024-05-08 14:06   ` [PATCH 3/4] ranger: Revert the workaround introduced in PR112788 [PR112993] Aldy Hernandez
2024-05-08  5:36 ` [PATCH 4/4] tree: Remove KFmode workaround [PR112993] Kewen.Lin
2024-05-09 19:12 ` [PATCH 1/4] rs6000: Make all 128 bit scalar FP modes have 128 bit precision [PR112993] Joseph Myers
2024-05-10  6:31   ` Richard Biener
2024-05-13  1:39     ` Kewen.Lin
2024-05-13  7:11       ` Richard Biener
2024-05-13 13:18       ` Joseph Myers
2024-05-24 10:19         ` [RFC/PATCH] Replace {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE with new hook Kewen.Lin
2024-05-24 12:23           ` Richard Biener
2024-05-29  3:27             ` Kewen.Lin
2024-05-30 18:10               ` Joseph Myers
2024-05-28 21:06           ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79b24bb3-f5b7-5ada-ca84-a1deda04df83@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=meissner@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).