[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

Segher Boessenkool  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Segher Boessenkool  ---
Fixed.

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-29 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

--- Comment #8 from Segher Boessenkool  ---
Author: segher
Date: Mon Oct 29 07:36:45 2018
New Revision: 265582

URL: https://gcc.gnu.org/viewcvs?rev=265582=gcc=rev
Log:
combine: Fix various shortcomings in make_more_copies (PR87701, PR87780)

This rewrites most of make_more_copies, in the process fixing a few PRs
and some other bugs, and working around a few target problems.  Certain
notes turn out to actually change the meaning of the RTL, so we cannot
drop them; and i386 takes subregs of hard regs.


PR rtl-optimization/87701
PR rtl-optimization/87780
* combine.c (make_more_copies): Rewrite.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine.c

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

--- Comment #7 from Segher Boessenkool  ---
I have a patch.

rtl.texi has this to say about subregs of hard regs:
===
@item hard registers
It is seldom necessary to wrap hard registers in @code{subreg}s; such
registers would normally reduce to a single @code{reg} rtx.  This use of
@code{subreg}s is discouraged and may not be supported in the future.
===

So why is the i386 backend doing this?  It seems wrong.

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

Segher Boessenkool  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |segher at gcc dot 
gnu.org

--- Comment #6 from Segher Boessenkool  ---
We start off with

(insn 36 35 9 2 (set (reg:V4SI 104)
(subreg:V4SI (reg:TI 1 dx [ b ]) 0)) "87701.cc":13:31 -1
 (expr_list:REG_DEAD (reg:DI 2 cx)
(expr_list:REG_DEAD (reg:DI 1 dx)
(nil

and replace that with

(insn 41 35 42 2 (set (reg:V4SI 107)
(reg:TI 1 dx [ b ])) "87701.cc":13:31 -1
 (expr_list:REG_DEAD (reg:TI 1 dx [ b ])
(nil)))


42: r104:V4SI=r107:V4SI
  REG_DEAD r107:V4SI

(no long form dump for that last one, sorry).  Note the subreg has
gone missing.  So which is correct here: with or without subreg?

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

--- Comment #5 from Segher Boessenkool  ---
I see the problem.  Mine.

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-27 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2018-10-23 00:00:00 |2018-10-27
 Ever confirmed|0   |1

--- Comment #4 from Segher Boessenkool  ---
Confirmed.

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-27 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

David Binderman  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #3 from David Binderman  ---
Code compiles ok at -O2, so -O3 required. 

Bug seems to first appear somewhere between revision 265367 and 265411.

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-23 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

--- Comment #2 from Martin Liška  ---
(In reply to Richard Biener from comment #1)
> x86?

Yes! I forgot to mention that.

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

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

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*

--- Comment #1 from Richard Biener  ---
x86?

[Bug rtl-optimization/87701] [9 Regression] ICE in elimination_costs_in_insn, at reload1.c:3640 since r265398

2018-10-23 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87701

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2018-10-23
  Known to work||8.2.0
   Target Milestone|--- |9.0
  Known to fail||9.0