https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68172

            Bug ID: 68172
           Summary: [6 Regression] LTO/PGO bootstrapped compiler is
                    miscompiled (looping in sched_rgn_init)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---
              Host: powerpc64le-unknown-linux-gnu
            Target: powerpc64le-unknown-linux-gnu
             Build: powerpc64le-unknown-linux-gnu

Created attachment 36631
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36631&action=edit
testcase

On ppc64le gcc gets miscompiled when configured and built like this:

--with-build-config="bootstrap-lto bootstrap-O3"
make profiledbootstrap

The resulting compiler loops in sched_rgn_init on the attached testcase.

 % gcc -c -O3 warped_autocorrelation_FLP.i

Overhead  Command  Shared Object      Symbol
  98.23%  cc1      cc1                [.] sched_rgn_init 
   0.10%  cc1      libc-2.20.so       [.] free
   0.09%  cc1      libc-2.20.so       [.] _int_malloc

       │                           becomes zero.  Repeat until no blocks are
left on the
       │                           list.  This produces a topological list of
blocks in
       │                           the region.  */
       │                        while (tail >= 0)
       │                          {
       │                            if (head < 0) 
  4.33 │        cmpwi  cr5,r6,-1 
       │        beq-   cr5,10c8b4d8 <sched_rgn_init(bool)+0x28a8>
       │                              head = tail;
       │                            child = queue[head]; 
 10.06 │        rldicr r0,r6,2,61
 47.05 │        lwax   r11,r22,r0
       │                            if (degree[child] == 0)
       │        rldicr r4,r11,2,61
  1.11 │        lwzx   r8,r31,r4
       │        cmpwi  cr7,r8,0
       │        bne    cr7,10c8adc0 <sched_rgn_init(bool)+0x2190>
       │                              { 
       │                                edge e;
       │                                       
       │                                degree[child] = -1;
       │                                rgn_bb_table[idx++] = child;
       │        lwa    r16,40(r1)

Reply via email to