public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jiufu Guo <guojiufu@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: "Kewen.Lin" <linkw@linux.ibm.com>,
	dje.gcc@gmail.com, linkw@gcc.gnu.org, meissner@linux.ibm.com,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] testsuite: update requires for powerpc/float128-cmp2-runnable.c
Date: Wed, 12 Apr 2023 13:06:54 +0800	[thread overview]
Message-ID: <7nzg7d8z9t.fsf@ltcden2-lp1.aus.stglabs.ibm.com> (raw)
In-Reply-To: <20230411151335.GB19790@gate.crashing.org> (Segher Boessenkool's message of "Tue, 11 Apr 2023 10:13:35 -0500")

Hi,

Segher Boessenkool <segher@kernel.crashing.org> writes:

> On Tue, Apr 11, 2023 at 05:40:09PM +0800, Kewen.Lin wrote:
>> on 2023/4/11 17:14, guojiufu wrote:
>> > Thanks for raising this concern.
>> > The behavior to check about bif on FLOAT128_HW and emit an error message for
>> > requirements on quad-precision is added in gcc12. This is why gcc12 fails to
>> > compile the case on -m32.
>> > 
>> > Before gcc12, altivec_resolve_overloaded_builtin will return the overloaded
>> > result directly, and does not check more about the result function.
>> 
>> Thanks for checking, I wonder which commit caused this behavior change and what's
>> the underlying justification?  I know there is one new bif handling framework
>> introduced in gcc12, not sure the checking condition was changed together or by
>> a standalone commit.  Anyway, apparently the conditions for the support of these
>> bifs are different on gcc-11 and gcc-12, I wonder why it changed.  As mentioned
>> above, PR108758's c#1 said this case (bifs) work well on gcc-11, I suspected the
>> condition change was an overkill, that's why I asked.
>
> It almost certainly was an oversight.  The new builtin framework changed
> so many things, there was bound to be some breakage to go with all the
> good things it brought.

Yes, the condition checking on gcc-12 is different from gcc-11. In
gcc-11, the condition on overloaded bif is not checked.
And, there are a few commits related to the bifs change. e.g.
r12-4977-ga28cfe49203705 introduces a new bif expand function which has
the ability to check more bif's target requirements like ieee128_hw.
And another commit changes the error message (r12-6684).

>
> So what is the actual thing going wrong?  QP insns work fine and are
> valid on all systems and environments, BE or LE, 32-bit or 64-bit.  Of
> course you cannot use the "long double" type for those everywhere, but
> that is a very different thing.

Currently, when compiling bif __builtin_vsx_scalar_cmp_exp_qp_eq,
gcc generates error message:
error: '__builtin_vsx_scalar_cmp_exp_qp_eq' requires quad-precision
floating-point arithmetic

IMHO, this error would be ok.  Because it makes sense that this bif
needs ieee128_hw.

BR,
Jeff (Jiufu)

>
>
> Segher

  reply	other threads:[~2023-04-12  5:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10  2:09 Jiufu Guo
2023-04-10  9:26 ` Kewen.Lin
2023-04-11  9:14   ` guojiufu
2023-04-11  9:40     ` Kewen.Lin
2023-04-11 15:13       ` Segher Boessenkool
2023-04-12  5:06         ` Jiufu Guo [this message]
2023-04-12  5:31           ` Jiufu Guo
2023-04-12 14:46             ` Michael Meissner
2023-04-13  5:35               ` guojiufu
2023-04-12 12:47         ` Kewen.Lin
2023-04-13  7:42           ` Kewen.Lin
2023-04-13  7:45           ` guojiufu
2023-04-13  8:09             ` Kewen.Lin

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=7nzg7d8z9t.fsf@ltcden2-lp1.aus.stglabs.ibm.com \
    --to=guojiufu@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@gcc.gnu.org \
    --cc=linkw@linux.ibm.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).