From: luoxhu <luoxhu@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com,
wschmidt@linux.ibm.com, guojiufu@linux.ibm.com,
linkw@gcc.gnu.org
Subject: Re: [PATCH] rs6000: Split movsf_from_si from high word before reload[PR89310]
Date: Fri, 10 Jul 2020 15:41:33 +0800 [thread overview]
Message-ID: <a2b1c793-5dce-404a-1347-74a5a854b655@linux.ibm.com> (raw)
In-Reply-To: <20200709192515.GO3598@gate.crashing.org>
On 2020/7/10 03:25, Segher Boessenkool wrote:
>
>> + "TARGET_NO_SF_SUBREG"
>> + "#"
>> + "&& vsx_reg_sfsubreg_ok (operands[0], SFmode)"
>
> Put this in the insn condition? And since this is just a predicate,
> you can just use it instead of gpc_reg_operand.
>
> (The split condition becomes "&& 1" then, not "").
>
+(define_insn_and_split "movsf_from_si2"
+ [(set (match_operand:SF 0 "vsx_reg_sfsubreg_ok" "=wa")
+ (unspec:SF
+ [(subreg:SI
+ (ashiftrt:DI
+ (match_operand:DI 1 "input_operand" "r")
+ (const_int 32))
+ 0)]
+ UNSPEC_SF_FROM_SI))
+ (clobber (match_scratch:DI 2 "=r"))]
+ "TARGET_NO_SF_SUBREG"
+ "#"
+ "&& 1"
+ [(const_int 0)]
This change is invalid as it will cause an ICE in PR42475.c, reason is:
insn #29 will be combined to insn #40, though split1 is success, but it
will cause ICE in sched1 as the op[0] is not SFmode. Without this, #29
won't be combined to #40 as the gpc_reg_operand (operands[0], E_SFmode)
will cause the match fail for subreg:SF (reg:SI 155 [ _4 ]) 0).
pr42475.c.268r.combine:
Trying 29 -> 40:
29: {r120:SF=unspec[r133:DI>>0x20#0] 86;clobber scratch;}
40: r155:SI#0=r120:SF
REG_DEAD r120:SF
Successfully matched this instruction:
(set (subreg:SF (reg:SI 155 [ _4 ]) 0)
(unspec:SF [
(subreg:SI (ashiftrt:DI (reg:DI 133)
(const_int 32 [0x20])) 0)
] UNSPEC_SF_FROM_SI))
allowing combination of insns 29 and 40
original costs 12 + 4 = 16
replacement cost 12
deferring deletion of insn with uid = 29.
modifying insn i3 40: {r155:SI#0=unspec[r133:DI>>0x20#0] 86;clobber scratch;}
REG_DEAD r133:DI
deferring rescan insn with uid = 40.
pr42475.c.273r.split1:
69: r172:DI=r133:DI&0xffffffff00000000
70: r155:SI#0=unspec[r172:DI] 62
71: r155:SI#0=unspec[r155:SI#0] 103
41: NOTE_INSN_DELETED
42: r157:DI=r155:SI#0<<0x20
pr42475.c.280r.sched1:
pr42475.c: In function ‘bar’:
pr42475.c:20:1: error: unrecognizable insn:
20 | }
| ^
(insn 71 70 41 2 (set (subreg:SF (reg:SI 155 [ _4 ]) 0)
(unspec:SF [
(subreg:SF (reg:SI 155 [ _4 ]) 0)
] UNSPEC_VSX_CVSPDPN)) -1
(nil))
during RTL pass: sched1
dump file: pr42475.c.280r.sched1
pr42475.c:20:1: internal compiler error: in extract_insn, at recog.c:2294
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
VS not using vsx_reg_sfsubreg_ok as condition:
pr42475.c.268r.combine:
Trying 29 -> 40:
29: {r120:SF=unspec[r133:DI>>0x20#0] 86;clobber scratch;}
40: r155:SI#0=r120:SF
REG_DEAD r120:SF
Failed to match this instruction:
(set (subreg:SF (reg:SI 155 [ _4 ]) 0)
(unspec:SF [
(subreg:SI (ashiftrt:DI (reg:DI 133)
(const_int 32 [0x20])) 0)
] UNSPEC_SF_FROM_SI))
273r.split1:
69: r172:DI=r133:DI&0xffffffff00000000
70: r120:SF=unspec[r172:DI] 62
71: r120:SF=unspec[r120:SF] 103
40: r155:SI#0=r120:SF
REG_DEAD r120:SF
prev parent reply other threads:[~2020-07-10 7:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 2:17 Xionghu Luo
2020-07-07 0:18 ` Segher Boessenkool
2020-07-07 8:39 ` luoxhu
2020-07-07 21:31 ` Segher Boessenkool
2020-07-08 3:19 ` luoxhu
2020-07-08 22:43 ` Segher Boessenkool
2020-07-09 3:09 ` luoxhu
2020-07-09 19:25 ` Segher Boessenkool
2020-07-10 1:39 ` [PATCH] rs6000: Define movsf_from_si2 to extract high part SF element from DImode[PR89310] luoxhu
2020-07-11 0:54 ` Segher Boessenkool
2020-07-13 6:30 ` luoxhu
2020-07-14 14:17 ` David Edelsohn
2020-07-15 3:47 ` luoxhu
2020-07-20 15:31 ` Segher Boessenkool
2020-07-21 3:43 ` luoxhu
2020-07-10 7:41 ` luoxhu [this message]
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=a2b1c793-5dce-404a-1347-74a5a854b655@linux.ibm.com \
--to=luoxhu@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=guojiufu@linux.ibm.com \
--cc=linkw@gcc.gnu.org \
--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).