* patch to fix PR88317
@ 2018-12-04 22:56 Vladimir Makarov
0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2018-12-04 22:56 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
 The following patch fixes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88317
 The patch was successfully bootstrapped and tested on x86/x86-64.
 I think the test is too big to add it to GCC testsuite. If Richard
implements bitmap poisoning, it would be possible to find a smaller test.
 Committed as rev. 266803.
[-- Attachment #2: pr88317.patch --]
[-- Type: text/x-patch, Size: 1914 bytes --]
Index: ChangeLog
===================================================================
--- ChangeLog (revision 266802)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/88317
+ * lra-constraints.c (split_reg): Don't set up check_only_regs if
+ we are outside the inheritance pass.
+
2018-12-04 Jan Hubicka <hubicka@ucw.cz>
* ipa-prop.c (jump_function_useful_p): New.
Index: lra-constraints.c
===================================================================
--- lra-constraints.c (revision 266682)
+++ lra-constraints.c (working copy)
@@ -5496,7 +5496,9 @@ lra_copy_reg_equiv (unsigned int new_reg
ORIGINAL_REGNO. NEXT_USAGE_INSNS specifies which instruction in
the EBB next uses ORIGINAL_REGNO; it has the same form as the
"insns" field of usage_insns. If TO is not NULL, we don't use
- usage_insns, we put restore insns after TO insn.
+ usage_insns, we put restore insns after TO insn. It is a case when
+ we call it from lra_split_hard_reg_for, outside the inheritance
+ pass.
The transformations look like:
@@ -5652,16 +5654,18 @@ split_reg (bool before_p, int original_r
&& mode == PSEUDO_REGNO_MODE (original_regno))
lra_copy_reg_equiv (new_regno, original_regno);
lra_reg_info[new_regno].restore_rtx = regno_reg_rtx[original_regno];
- bitmap_set_bit (&check_only_regs, new_regno);
- bitmap_set_bit (&check_only_regs, original_regno);
bitmap_set_bit (&lra_split_regs, new_regno);
if (to != NULL)
{
+ lra_assert (next_usage_insns == NULL);
usage_insn = to;
after_p = TRUE;
}
else
{
+ /* We need check_only_regs only inside the inheritance pass. */
+ bitmap_set_bit (&check_only_regs, new_regno);
+ bitmap_set_bit (&check_only_regs, original_regno);
after_p = usage_insns[original_regno].after_p;
for (;;)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-04 22:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 22:56 patch to fix PR88317 Vladimir Makarov
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).