[Desktop-packages] [Bug 1862053]

2020-02-20 Thread Bergner-gcc
Ok, after debugging, this looks to be a bug in rs6000_legitimate_address_p().
At the beginning of LRA, we have the following insn:

(insn 520 67 71 5 (set (mem:V16QI (and:DI (reg/f:DI 110 sfp)
(const_int -16 [0xfff0])) [0 MEM  
[(char *) + 16B]+0 S16 A128])
(reg:V16QI 303 [ vect__2.13 ])) "bug.i":10:10 1103 {vsx_movv16qi_64bit}
 (expr_list:REG_DEAD (reg:V16QI 303 [ vect__2.13 ])
(nil)))

lra_eliminate() then converts that to:

(insn 520 67 71 5 (set (mem:V16QI (and:DI (plus:DI (reg/f:DI 110 sfp)
(const_int 112 [0x70]))
(const_int -16 [0xfff0])) [0 MEM  
[(char *) + 16B]+0 S16 A128])
(reg:V16QI 303 [ vect__2.13 ])) "bug.i":10:10 1103 {vsx_movv16qi_64bit}
 (expr_list:REG_DEAD (reg:V16QI 303 [ vect__2.13 ])
(nil)))

which isn't valid and needs fixing...which is fine.  process_address()
then gives us:

(insn 520 67 71 5 (set (mem:V16QI (and:DI (reg:DI 633)
(const_int -16 [0xfff0])) [0 MEM  
[(char *) + 16B]+0 S16 A128])
(reg:V16QI 303 [ vect__2.13 ])) "bug.i":10:10 1103 {vsx_movv16qi_64bit}
 (expr_list:REG_DEAD (reg:V16QI 303 [ vect__2.13 ])
(nil)))

...with pseudo 633 being set to plus:DI (reg/f:DI 110 sfp) (const_int 112 
[0x70])
which is also good.  The bug comes when we now pass insn 520 to 
rs6000_legitimate_address_p() and we hit the following code:

  /* If this is an unaligned stvx/ldvx type address, discard the outer AND.  */
  if (VECTOR_MEM_ALTIVEC_P (mode)
  && GET_CODE (x) == AND
  && CONST_INT_P (XEXP (x, 1))
  && INTVAL (XEXP (x, 1)) == -16)
x = XEXP (x, 0);

Our mode is V16QI, so we should execute this code, but we don't.  The
problem is that VECTOR_MEM_ALTIVEC_P(mode) checks for
"rs6000_vector_unit[(MODE)] == VECTOR_ALTIVEC" and V16QI mode returns
VECTOR_VSX, so we fail to fall into the code above and end up telling
LRA this isn't a valid address.  LRA then attempts to spill this again
and again and...

The following patch fixes the bug for me and I'm regtesting it now:

--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -8808,7 +8808,7 @@ rs6000_legitimate_address_p (machine_mode mode, rtx x, 
bool reg_ok_strict)
   bool quad_offset_p = mode_supports_dq_form (mode);
 
   /* If this is an unaligned stvx/ldvx type address, discard the outer AND.  */
-  if (VECTOR_MEM_ALTIVEC_P (mode)
+  if (VECTOR_MEM_ALTIVEC_OR_VSX_P (mode)
   && GET_CODE (x) == AND
   && CONST_INT_P (XEXP (x, 1))
   && INTVAL (XEXP (x, 1)) == -16)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  In Progress
Status in gcc-9 package in Ubuntu:
  New
Status in ghostscript package in Ubuntu:
  Confirmed

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-02-12 Thread Bergner-gcc
So we are in an infinite loop in process_address() calling
process_address_1().  I've hacked in some code to ICE if we loop for too
long and I'm currently using creduce to minimize the test case.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc package in Ubuntu:
  Confirmed
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-02-12 Thread Bergner-gcc
Confirmed.  With the options in Comment 4, I'm able to recreate the
hang/infinite loop.  I'll have a look.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc package in Ubuntu:
  Confirmed
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-02-12 Thread Bergner-gcc
I cannot recreate this with trunk or GCC 9 from today.  DO you have
extra patches applied or ???

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc package in Ubuntu:
  Confirmed
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-02-12 Thread Bergner-gcc
Here's the minimal test case using options -O3 -mcpu=power8 -fstack-
protector-strong:

void bar();
char b;
void
foo (void)
{
  char a;
  int d = b;
  char *e = 
  while (d)
*e++ = --d;
  bar ();
}

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc package in Ubuntu:
  Confirmed
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-02-12 Thread Bergner-gcc
(In reply to Jakub Jelinek from comment #8)
> On the #c7 testcase, this started with
> r8-6072-ga3a821c903c9fa2288712d31da2038d0297babcb (so I wonder why this
> isn't a 8/9/10 Regression).

I'm not sure Kelvin's patch is to blame.  I think it's just exposing a
latent issue.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc package in Ubuntu:
  Confirmed
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-03-30 Thread Bergner-gcc
Fixed everywhere.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc-9 package in Ubuntu:
  Fix Released
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1862053]

2020-03-30 Thread Bergner-gcc
Simple backports to GCC 8 and 9 exposed some bugs that have already been
fixed on trunk.  The following patch resubmission includes those extra
fixes that need backports too:

https://gcc.gnu.org/ml/gcc-patches/2020-02/msg01253.html

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ghostscript in Ubuntu.
https://bugs.launchpad.net/bugs/1862053

Title:
  Compiler gets stuck (or extremely slow) on ppc64el

Status in gcc:
  Confirmed
Status in gcc-9 package in Ubuntu:
  Fix Released
Status in ghostscript package in Ubuntu:
  Fix Released

Bug description:
  I have uploaded Ghostscript 9.50 to focal and it built without any
  problem on all architectures but ppc64el. On ppc64el the compiler
  seems to get stuck (or extremely slow) on one of the files of
  Ghostscript (devices/vector/gdevpdfb.c, I tried twice). This leads to
  the build process being killed after 150 minutes.

  See

  https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5/+build/18661407

  and

  https://launchpadlibrarian.net/463662514/buildlog_ubuntu-focal-
  ppc64el.ghostscript_9.50~dfsg-5_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1862053/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp