[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

Arseny Solokha  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Arseny Solokha  ---
Fixed on the trunk.

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-21 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

--- Comment #7 from Arseny Solokha  ---
Should we close this PR now?

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-19 Thread iii at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

--- Comment #6 from iii at gcc dot gnu.org ---
Author: iii
Date: Fri Oct 19 08:33:52 2018
New Revision: 265306

URL: https://gcc.gnu.org/viewcvs?rev=265306=gcc=rev
Log:
lra: fix spill_hard_reg_in_range clobber check

FROM..TO range might contain NOTE_INSN_DELETED insns, for which the
corresponding entries in lra_insn_recog_data[] are NULLs.  Example from
the problematic code from PR87596:

(note 148 154 68 7 NOTE_INSN_DELETED)

lra_insn_recog_data[] is used directly only when the insn in question
is taken from insn_bitmap, which is not the case here.  In other
situations lra_get_insn_recog_data () guarded by INSN_P () or other
stricter predicate are used.  So we need to do this here as well.

A tiny detail worth noting: I put the INSN_P () check before the
insn_bitmap check, because I believe that insn_bitmap can contain only
real insns anyway.

gcc/ChangeLog:

2018-10-19  Ilya Leoshkevich  

PR rtl-optimization/87596
* lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
lra_get_insn_recog_data () instead of lra_insn_recog_data[]
for instructions in FROM..TO range.

gcc/testsuite/ChangeLog:

2018-10-19  Ilya Leoshkevich  

PR rtl-optimization/87596
* gcc.target/i386/pr87596.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr87596.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-constraints.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

Arseny Solokha  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=87485

--- Comment #5 from Arseny Solokha  ---
I'd mark PR87485 as related, then.

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-12 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

Peter Bergner  changed:

   What|Removed |Added

 CC||iii at linux dot ibm.com

--- Comment #4 from Peter Bergner  ---
Well, Andreas seems to have committed it for Ilya, so CCing him too.

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-12 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

Peter Bergner  changed:

   What|Removed |Added

 CC||krebbel at gcc dot gnu.org

--- Comment #3 from Peter Bergner  ---
My bisect found that Andreas is the unlucky winner of this bug:

r263063 | krebbel | 2018-07-30 03:30:06 -0500 (Mon, 30 Jul 2018) | 18 lines

lra: consider clobbers when selecting hard_regno to spill

The idea behind the rclass loop in spill_hard_reg_in_range() seems to
be: find a hard_regno, which in general conflicts with reload regno,
but does not do so between `from` and `to`, and then do the live range
splitting based on this information. To check the absence of conflicts,
we make use of insn_bitmap, which does not contain insns which clobber
the hard_regno.

gcc/ChangeLog:

2018-07-30  Ilya Leoshkevich  

PR target/86547
* lra-constraints.c (spill_hard_reg_in_range): When selecting the
hard_regno, make sure no insn between `from` and `to` clobbers it.

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-12 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

Peter Bergner  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-12
 Ever confirmed|0   |1

--- Comment #2 from Peter Bergner  ---
ICE is confirmed, but it's not my fault.  I see the ICE with revision 264725
which is before any of my recent patches.  I'll continue bisecting to see if I
can pinpoint the bad revision though.

[Bug rtl-optimization/87596] [9 Regression] ICE: Segmentation fault (in spill_hard_reg_in_range)

2018-10-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87596

Richard Biener  changed:

   What|Removed |Added

   Keywords|ice-on-invalid-code |ice-on-valid-code, ra
 CC||bergner at gcc dot gnu.org
   Target Milestone|--- |9.0

--- Comment #1 from Richard Biener  ---
Likely Peters fault