public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	Mike Stump <mikestump@comcast.net>,
	David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Kewen Lin <linkw@gcc.gnu.org>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [PR99708] [rs6000] don't expect __ibm128 with 64-bit long double
Date: Thu, 6 Apr 2023 14:17:00 +0800	[thread overview]
Message-ID: <9eb5b41f-8ab1-ef2e-0429-8ce335e18304@linux.ibm.com> (raw)
In-Reply-To: <orcz4haaej.fsf@lxoliva.fsfla.org>

Hi Alexandre,

on 2023/4/6 12:43, Alexandre Oliva wrote:
> Hello, Kewen,
> 
> Thanks for the feedback.
> 
> On Mar 27, 2023, "Kewen.Lin" <linkw@linux.ibm.com> wrote:
> 
>> on 2023/3/25 16:37, Alexandre Oliva via Gcc-patches wrote:
>>>
>>> When long double is 64-bit wide, as on vxworks, the rs6000 backend
>>> defines neither the __ibm128 type nor the __SIZEOF_IBM128__ macro, but
>>> pr99708.c expected both to be always defined.  Adjust the test to
>>> match the implementation.
> 
>> There is one patch from Mike to define type __ibm128 even without
>> IEEE 128-bit floating point support, it's at the link:
> 
>> https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599984.html
> 
>> I would expect this issue would be gone if the adjustment on the
>> support of type __ibm128 gets landed in future.
> 
> Yeah, the issue would then be gone, but the patch is compatible with
> that proposed change: if __ibm128 and the corresponding SIZEOF macro are
> defined, the proposed change is a no-op.

Yeah, I agree.

> 
>> So maybe we can just xfail this for longdouble64?  What do you
>> think?
> 
> I wouldn't object to that, and I could even write and test the alternate
> patch for that, but I fail to understand why that would be more
> desirable.  Would you be so kind as to enlighten me?

The reason why personally I preferred to fix it with xfail is that:
  1) if the mentioned patch changing the condition of defining __ibm128 type
     gets re-tested, this case would change from XFAIL to XPASS, then it gets
     our attentions and shows some benefit of that patch (it can be also
     mentioned in that commit log).
  2) once the mentioned patch gets landed, the below hunk in the proposed patch
     becomes unreachable:

     +#else
     +      || __SIZEOF_LONG_DOUBLE__ * __CHAR_BIT__ != 64
     +#endif

     And it's very likely we won't remember to remove it.  At that time when
     someone reads the code, he/she can probably get the impression that type
     __ibm128 is not always defined even under effective target ppc_float128_sw,
     it could cause some misunderstanding.

Does it make sense to you?

BR,
Kewen

  reply	other threads:[~2023-04-06  6:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25  8:37 Alexandre Oliva
2023-03-27  7:05 ` Kewen.Lin
2023-04-06  4:43   ` Alexandre Oliva
2023-04-06  6:17     ` Kewen.Lin [this message]
2023-04-07  1:48       ` Alexandre Oliva
2023-04-07  9:49         ` Kewen.Lin
2023-04-15  2:55           ` Alexandre Oliva

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=9eb5b41f-8ab1-ef2e-0429-8ce335e18304@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=oliva@adacore.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --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).