public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/109610] [14 regression] gcc.target/powerpc/dform-3.c fails after r14-172-g0368d169492017
Date: Thu, 27 Apr 2023 01:36:15 +0000 [thread overview]
Message-ID: <bug-109610-4-L1rWua76Ph@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109610-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109610
--- Comment #7 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to rsandifo@gcc.gnu.org from comment #6)
> Please don't do the peephole thing! This seems like a
> target-independent problem.
>
> The costs for r117 look odd. Why is the cost of GENERAL_REGS so high
> when the use (before the introduction of insn 13) explicitly requires
> GENERAL_REGS?
>
> Given those costs, the behaviour after the patch looks correct
> (on the basis of the information its working with, I mean,
> even though it's not the desired effect).
(define_insn "vsx_mov<mode>_64bit"
[(set (match_operand:VSX_M 0 "nonimmediate_operand"
"=ZwO, wa, wa, r, we, ?wQ,
?&r, ??r, ??Y, <??r>, wa, v,
wa, wa,
?wa, v, <??r>, wZ, v")
(match_operand:VSX_M 1 "input_operand"
"wa, ZwO, wa, we, r, r,
wQ, Y, r, r, wE, jwM,
eQ, eP,
?jwM, W, <nW>, v, wZ"))]
"TARGET_POWERPC64 && VECTOR_MEM_VSX_P (<MODE>mode)
&& (register_operand (operands[0], <MODE>mode)
|| register_operand (operands[1], <MODE>mode))"
{
return rs6000_output_move_128bit (operands);
}
Because the backend pattern explicitly disparage the alternative (<??r>, r),
(??r, Y) which moves from GENERAL_REGS/MEM to GENERAL_REGS. And in cost
calculation, RA will add extra 2 for each '?', that's why cost of GENERAL_REGS
is so high. If manually remove ?? from ??r, then the cost for GENERAL_REGS will
become 0, then RA can allocate r117 as GENERAL_REGS, the extra move can be
eliminated by pass_reload.
----------cost after removing ?? from ??r--------------
a2(r117,l0) costs: BASE_REGS:0,0 GENERAL_REGS:0,0 FLOAT_REGS:0,0
ALTIVEC_REGS:0,0 VSX_REGS:0,0 GEN_OR_FLOAT_REGS:12000,12000
GEN_OR_VSX_REGS:12000,12000 MEM:0,0
-----------end-----------------------
So it looks like an target dependent issue, the backend dislike allocating
GENERAL_REGS for V2DFmode move, but inline asm explicitly want it to be in
GENERAL_REGS.
next prev parent reply other threads:[~2023-04-27 1:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 19:45 [Bug target/109610] New: [14 regression] gcc.target/powerpc/dform-3.c fails after seurer at gcc dot gnu.org
2023-04-25 2:59 ` [Bug target/109610] [14 regression] gcc.target/powerpc/dform-3.c fails after r14-172-g0368d169492017 crazylht at gmail dot com
2023-04-25 6:31 ` rguenth at gcc dot gnu.org
2023-04-25 9:15 ` crazylht at gmail dot com
2023-04-25 9:31 ` crazylht at gmail dot com
2023-04-26 3:14 ` crazylht at gmail dot com
2023-04-26 6:41 ` crazylht at gmail dot com
2023-04-26 14:15 ` rsandifo at gcc dot gnu.org
2023-04-27 1:36 ` crazylht at gmail dot com [this message]
2023-04-27 16:22 ` bergner at gcc dot gnu.org
2023-05-06 5:46 ` crazylht at gmail dot com
2023-05-15 8:39 ` segher at gcc dot gnu.org
2023-05-15 8:40 ` segher at gcc dot gnu.org
2023-05-17 6:05 ` linkw at gcc dot gnu.org
2023-05-26 1:46 ` cvs-commit at gcc dot gnu.org
2023-05-26 1:47 ` crazylht at gmail dot com
2023-06-02 22:56 ` bergner at gcc dot gnu.org
2023-06-06 19:44 ` seurer at gcc dot gnu.org
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=bug-109610-4-L1rWua76Ph@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.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).