[Bug target/64152] internal compiler error: in gen_add2_insn

2016-02-02 Thread renlin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64152

Renlin Li  changed:

   What|Removed |Added

 CC||renlin at gcc dot gnu.org

--- Comment #3 from Renlin Li  ---
As -mno-lra option is already deprecated since GCC 5 for arm/aarch64 backend.
This ICE doesn't manifest since then.

I came across an insn canonicalization problem which I think is similar to this
one, so I spent some time understanding what's going on in both cases.  For the
record, below is what I found.

To reload the following insn,

(set (reg:DI 5 x5)
 (plus:DI (reg/f:DI 31 sp)
  (mem/u/c:DI (symbol_ref/u:DI ("*.LC201") [flags 0x2]) [0  S8
A64])))


two insns are generated by reload:

(set (reg:DI 5 x5)
 (mem/u/c:DI (symbol_ref/u:DI ("*.LC201"

(set (reg:DI 5 x5)
 (plus:DI (reg:DI 5 x5)
  (reg/f:DI 31 sp))) {*adddi3_aarch64}

The second insn here is not an strict rtx, because the rtx pattern defined in
the backend doesn't allow the third operand to be SP register.

However, at this stage, the rtx pattern is required to be strict.
So this reload is rejected, forcing the reload pass to try other possibilities,
This eventually leads the the ICEs observed here.

I have checked that there is no insn canonicalization rule for this scenario.
Either the target should provided more relaxed add pattern or the reload pass
can
try to swap the source operands for this commutative operator.

[Bug target/64152] internal compiler error: in gen_add2_insn

2014-12-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64152

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Compile with cc1plus, it's a C++ testcase.


[Bug target/64152] internal compiler error: in gen_add2_insn

2014-12-02 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64152

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1


[Bug target/64152] internal compiler error: in gen_add2_insn

2014-12-02 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64152

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

   Last reconfirmed||2014-12-2
 CC||ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Confirmed FWIW.