From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
Bill Schmidt <wschmidt@linux.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} under hard float [PR103623]
Date: Mon, 11 Apr 2022 16:29:40 +0800 [thread overview]
Message-ID: <31b02ece-83e3-f940-8898-c0a9c19c38bd@linux.ibm.com> (raw)
In-Reply-To: <20220408173105.GU614@gate.crashing.org>
Hi Segher,
on 2022/4/9 1:31 AM, Segher Boessenkool wrote:
> On Fri, Apr 08, 2022 at 10:09:44AM +0800, Kewen.Lin wrote:
>> As Jakub noted here, we don't have the soft-float support for both m32 and m64
>> before, as the bifs are always guarded under hard-float previously.
>
> But that bug was fixed for GCC 12. Or we thought so, at least :-(
>
Actually it wasn't fixed due to the incomplete support. :(
>>>> What makes it ICE on (at least some configurations of) 32-bit now? Can
>>>> you exclude just 32-bit soft float?
>>
>> As clarified above, both 32-bit and 64-bit has the same root cause for the ICE,
>> the existing define_insn* supports for these bifs only consider hard-float, such
>> as for the given test case in the PR, it fails in reload as the recognized
>> unpacktf_nodm doesn't have any available alternatives at soft-float. eg: we only
>> have register constraint "d" for
>> (match_operand:FMOVE128 1 "register_operand" "d,d")
>> but it's only available for hard-float.
>
> For me it fails during combine: the unspec suddenly doesn't recog
> anymore. That might be that "d" thing yes, that is problematical.
>
I must miss something, I found in combine pass we still have the
the insn_code unpacktf_nodm (recog-ed).
> If you want to add "nosoft" now, please add a FIXME comment everywhere
> you do, so we do not forget to fix this for GCC 13.
>
Does the patch v3 look good to you?
https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593053.html
> Or, try this patch?
>
> ===
> diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
> index fdfbc6566a5c..f05b8358ba0a 100644
> --- a/gcc/config/rs6000/rs6000.md
> +++ b/gcc/config/rs6000/rs6000.md
> @@ -14580,10 +14580,10 @@ (define_insn_and_split "unpack<mode>_dm"
> [(set_attr "type" "fp,fpstore,mtvsr,mfvsr,store")])
>
> (define_insn_and_split "unpack<mode>_nodm"
> - [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m")
> + [(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,m")
> (unspec:<FP128_64>
> - [(match_operand:FMOVE128 1 "register_operand" "d,d")
> - (match_operand:QI 2 "const_0_to_1_operand" "i,i")]
> + [(match_operand:FMOVE128 1 "register_operand" "d,d,r")
> + (match_operand:QI 2 "const_0_to_1_operand" "i,i,i")]
> UNSPEC_UNPACK_128BIT))]
> "(!TARGET_POWERPC64 || !TARGET_DIRECT_MOVE) && FLOAT128_2REG_P (<MODE>mode)"
> "#"
> @@ -14600,7 +14600,7 @@ (define_insn_and_split "unpack<mode>_nodm"
>
> operands[3] = gen_rtx_REG (<FP128_64>mode, fp_regno);
> }
> - [(set_attr "type" "fp,fpstore")])
> + [(set_attr "type" "fp,fpstore,store")])
>
> (define_insn_and_split "pack<mode>"
> [(set (match_operand:FMOVE128 0 "register_operand" "=&d")
> ===
>
>
Nice, I confirmed this makes ICE gone, I've filed one new PR
PR105213 for GCC13 further tracking by associating this patch there.
BR,
Kewen
next prev parent reply other threads:[~2022-04-11 8:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 2:11 [PATCH] rs6000: Guard bifs {un,}pack_{longdouble,ibm128} " Kewen.Lin
2022-03-15 11:36 ` PING^1 [PATCH] rs6000: Guard bifs {un, }pack_{longdouble, ibm128} " Kewen.Lin
2022-04-07 11:09 ` Segher Boessenkool
2022-04-07 13:00 ` Jakub Jelinek
2022-04-08 2:09 ` Kewen.Lin
2022-04-08 17:31 ` Segher Boessenkool
2022-04-11 8:29 ` Kewen.Lin [this message]
2022-04-11 15:42 ` Segher Boessenkool
2022-04-12 2:02 ` Kewen.Lin
2022-04-12 19:11 ` Segher Boessenkool
2022-04-13 1:05 ` Kewen.Lin
2022-04-08 16:56 ` Segher Boessenkool
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=31b02ece-83e3-f940-8898-c0a9c19c38bd@linux.ibm.com \
--to=linkw@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.com \
/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).