[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-02-10 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #15 from Andreas Krebbel  ---
(In reply to Richard Earnshaw from comment #14)
> I think you should open a new bug report.  This one has been closed (and the
> ICE has been fixed), so this is a new issue.

I've opened #79456

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-02-10 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #14 from Richard Earnshaw  ---
(In reply to Andreas Krebbel from comment #12)

> Starting with that patch we see worse code being generated for:
> 
> int __attribute__((noinline,noclone))
> all_eq_double (double __attribute__((vector_size(16))) a,
>double __attribute__((vector_size(16))) b)
> {
>  return __builtin_s390_vec_all_eq (a, b);
> }
> 
> gcc -O3 -march=z13
> before:
> vfcedbs %v0,%v24,%v26
> lhi %r2,1
> lochine %r2,0
> lgfr%r2,%r2
> br  %r14
> after:
> vfcedbs %v0,%v24,%v26
> lhi %r2,1
> lr  %r1,%r2
> lochine %r1,0
> lgfr%r2,%r1
> br  %r14
> 
> Note: ideally it should be more like:
> vfcedbs %v0,%v24,%v26
> lghi %r2,1
> locghine %r2,0
> br %r14
> ... but that's a different topic:


I think you should open a new bug report.  This one has been closed (and the
ICE has been fixed), so this is a new issue.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-02-10 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #13 from Dominik Vogt  ---
Same without vectors:

long foo (long a, long b)   
{
return a > b;
}

=>

cgr %r2,%r3
lghi%r1,1
locghinh%r1,0
lgr %r2,%r1
br  %r14

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-02-10 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

Andreas Krebbel  changed:

   What|Removed |Added

 CC||krebbel at gcc dot gnu.org

--- Comment #12 from Andreas Krebbel  ---
(In reply to Vladimir Makarov from comment #3)
> Author: vmakarov
> Date: Thu Jan 26 17:08:12 2017
> New Revision: 244942
> 
> URL: https://gcc.gnu.org/viewcvs?rev=244942=gcc=rev
> Log:
> 2017-01-26  Vladimir Makarov  
> 
>   PR target/79131
>   * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
>   endianess for subregs into account.
>   * lra-constraints.c (lra_constraints): Do risky transformations
>   always on the first iteration.
>   * lra-lives.c (check_pseudos_live_through_calls): Add arg
>   last_call_used_reg_set.
>   (process_bb_lives): Define and use last_call_used_reg_set.
>   * lra.c (lra): Always continue after lra_constraints on the first
>   iteration.
> 
> 2017-01-26  Vladimir Makarov  
> 
>   PR target/79131
>   * gcc.target/arm/pr79131.c: New.

Starting with that patch we see worse code being generated for:

int __attribute__((noinline,noclone))
all_eq_double (double __attribute__((vector_size(16))) a,
   double __attribute__((vector_size(16))) b)
{
 return __builtin_s390_vec_all_eq (a, b);
}

gcc -O3 -march=z13
before:
vfcedbs %v0,%v24,%v26
lhi %r2,1
lochine %r2,0
lgfr%r2,%r2
br  %r14
after:
vfcedbs %v0,%v24,%v26
lhi %r2,1
lr  %r1,%r2
lochine %r1,0
lgfr%r2,%r1
br  %r14

Note: ideally it should be more like:
vfcedbs %v0,%v24,%v26
lghi %r2,1
locghine %r2,0
br %r14
... but that's a different topic:

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-30 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #11 from Dominik Vogt  ---
The cross compiler s390x->arm works fine now.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-27 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #10 from Jeffrey A. Law  ---
Per c#8 and c#9.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-27 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #9 from Arnd Bergmann  ---
I successfully rebuilt all the (now seven) previously failing kernel
configurations, no more ICE.

Thanks a lot!

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-27 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #8 from Vladimir Makarov  ---
I provided the final patch solving all the test cases for the PR.  We should
wait for an ACK from Arnd or Dominik to close it.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-27 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #7 from Vladimir Makarov  ---
Author: vmakarov
Date: Fri Jan 27 16:50:11 2017
New Revision: 244989

URL: https://gcc.gnu.org/viewcvs?rev=244989=gcc=rev
Log:
2017-01-27  Vladimir Makarov  

PR target/79131
* lra-assigns.c (find_hard_regno_for_1): Take endianess for into
account to calculate conflict_set.

2017-01-27  Vladimir Makarov  

PR target/79131
* gcc.target/arm/pr79131.c: Rename to gcc.target/arm/pr79131-1.c.
* gcc.target/arm/pr79131-2.c: New.


Added:
trunk/gcc/testsuite/gcc.target/arm/pr79131-1.c
  - copied unchanged from r244942,
trunk/gcc/testsuite/gcc.target/arm/pr79131.c
trunk/gcc/testsuite/gcc.target/arm/pr79131-2.c
Removed:
trunk/gcc/testsuite/gcc.target/arm/pr79131.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-assigns.c
trunk/gcc/testsuite/ChangeLog

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-26 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #6 from Vladimir Makarov  ---
(In reply to Jakub Jelinek from comment #4)
> So, is this now fixed or is further work needed?

A further work is needed.  There are a few different problems with the big
endian support.  I'll submit more patches.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-26 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #5 from Dominik Vogt  ---
The tests cases from the first message still fail using a cross compiler and
r244951.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-26 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
So, is this now fixed or is further work needed?

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-26 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #3 from Vladimir Makarov  ---
Author: vmakarov
Date: Thu Jan 26 17:08:12 2017
New Revision: 244942

URL: https://gcc.gnu.org/viewcvs?rev=244942=gcc=rev
Log:
2017-01-26  Vladimir Makarov  

PR target/79131
* lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
endianess for subregs into account.
* lra-constraints.c (lra_constraints): Do risky transformations
always on the first iteration.
* lra-lives.c (check_pseudos_live_through_calls): Add arg
last_call_used_reg_set.
(process_bb_lives): Define and use last_call_used_reg_set.
* lra.c (lra): Always continue after lra_constraints on the first
iteration.

2017-01-26  Vladimir Makarov  

PR target/79131
* gcc.target/arm/pr79131.c: New.


Added:
trunk/gcc/testsuite/gcc.target/arm/pr79131.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-assigns.c
trunk/gcc/lra-constraints.c
trunk/gcc/lra-lives.c
trunk/gcc/lra.c
trunk/gcc/testsuite/ChangeLog

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-25 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #2 from Vladimir Makarov  ---
(In reply to Vladimir Makarov from comment #1)
> 
> Probably the fix will need more time than for pr79058 but I hope to fix it
> on this week.

I have a fix for the PR. Unfortunately it brakes some GCC IP RA regression
tests.  IP RA was not adopted by LRA.  We were just fortunate that the IP RA
tests worked so far (actually for the IP RA tests, LRA just used allocation
from IRA and therefore tests worked successfully).

So now I need to implement IP RA part in LRA to commit the patch.  So probably
the fix will need one more week to be done.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-18 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-19
 Ever confirmed|0   |1

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-18 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

--- Comment #1 from Vladimir Makarov  ---
This is a bug in LRA now.  LRA should have reloaded the destination or the
operand as they conflicts in insn 31 (the destination is an early clobbered
operand).  IRA does not take early clobbers into account as they are usually
insn alternative specific and IRA can not predict the final alternative.  So
dealing with such cases is LRA responsibility.

The input operand is a paradoxical subreg and probably LRA does not behave
correctly for big-endian targets.

Probably the fix will need more time than for pr79058 but I hope to fix it on
this week.

[Bug target/79131] [7 Regression] ICE: in extract_constrain_insn, at recog.c:2213, big-endian ARM

2017-01-18 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Component|rtl-optimization|target
   Target Milestone|--- |7.0