public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
@ 2013-12-10 11:13 dominiq at lps dot ens.fr
  2013-12-10 11:50 ` [Bug tree-optimization/59445] " rguenth at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-10 11:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

            Bug ID: 59445
           Summary: [4.9 Regression] ICE in add_old_iv_candidates, at
                    tree-ssa-loop-ivopts.c:2541
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
                CC: amker at gcc dot gnu.org, iains at gcc dot gnu.org
              Host: x86_64-apple-darwin13
            Target: x86_64-apple-darwin13
             Build: x86_64-apple-darwin13

Revision 205848 breaks bootstraps on x86_64-apple-darwin13:

/opt/gcc/build_w/./gcc/gcj
-B/opt/gcc/build_w/x86_64-apple-darwin13.0.0/i386/libjava/
-B/opt/gcc/build_w/x86_64-apple-darwin13.0.0/i386/libjava/
-B/opt/gcc/build_w/./gcc/ -B/opt/gcc/gcc4.9w/x86_64-apple-darwin13.0.0/bin/
-B/opt/gcc/gcc4.9w/x86_64-apple-darwin13.0.0/lib/ -isystem
/opt/gcc/gcc4.9w/x86_64-apple-darwin13.0.0/include -isystem
/opt/gcc/gcc4.9w/x86_64-apple-darwin13.0.0/sys-include -m32 -ffloat-store
-fomit-frame-pointer -Usun -fclasspath=
-fbootclasspath=../../../../work/libjava/classpath/lib --encoding=UTF-8
-Wno-deprecated -fbootstrap-classes -g -O2 -m32 -c
-fsource-filename=/opt/gcc/build_w/x86_64-apple-darwin13.0.0/i386/libjava/classpath/lib/classes
-MT java/awt/image.lo -MD -MP -MF java/awt/image.deps @java/awt/image.list
-fno-common -save-temps
/opt/gcc/work/libjava/classpath/java/awt/image/SinglePixelPackedSampleModel.java:
In class 'java.awt.image.SinglePixelPackedSampleModel':
/opt/gcc/work/libjava/classpath/java/awt/image/SinglePixelPackedSampleModel.java:
In method
'java.awt.image.SinglePixelPackedSampleModel.getPixels(int,int,int,int,int[],java.awt.image.DataBuffer)':
In file included from <built-in>:3:0:
/opt/gcc/work/libjava/classpath/java/awt/image/SinglePixelPackedSampleModel.java:354:0:
internal compiler error: in add_old_iv_candidates, at
tree-ssa-loop-ivopts.c:2541
     int offset = scanlineStride*y + x;
 ^

/opt/gcc/work/libjava/classpath/java/awt/image/SinglePixelPackedSampleModel.java:354:0:
internal compiler error: Abort trap: 6
gcj: internal compiler error: Abort trap: 6 (program jc1)
Abort


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
@ 2013-12-10 11:50 ` rguenth at gcc dot gnu.org
  2013-12-10 16:05 ` dominiq at lps dot ens.fr
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-12-10 11:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |4.9.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
  2013-12-10 11:50 ` [Bug tree-optimization/59445] " rguenth at gcc dot gnu.org
@ 2013-12-10 16:05 ` dominiq at lps dot ens.fr
  2013-12-10 16:29 ` hjl.tools at gmail dot com
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-10 16:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot med.uc.edu

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 59455 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
  2013-12-10 11:50 ` [Bug tree-optimization/59445] " rguenth at gcc dot gnu.org
  2013-12-10 16:05 ` dominiq at lps dot ens.fr
@ 2013-12-10 16:29 ` hjl.tools at gmail dot com
  2013-12-10 16:41 ` howarth at nitro dot med.uc.edu
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-10 16:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-12-10
     Ever confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Please add -v to gcj to show what options are passed to jc1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2013-12-10 16:29 ` hjl.tools at gmail dot com
@ 2013-12-10 16:41 ` howarth at nitro dot med.uc.edu
  2013-12-10 16:43 ` howarth at nitro dot med.uc.edu
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2013-12-10 16:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #3 from Jack Howarth <howarth at nitro dot med.uc.edu> ---
/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/./gcc/jc1
/var/tmp//ccSlyCZfjx -fhash-synchronization -fuse-divide-subroutine
-fcheck-references -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions
-fPIC -feliminate-unused-debug-symbols -quiet -dumpbase ccSlyCZfjx
-mmacosx-version-min=10.8.5 -m32 -mtune=generic -auxbase-strip
java/awt/.libs/image.o -g -O2 -Wno-deprecated -version -ffilelist-file
-ffloat-store -fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes
-fsource-filename=/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-apple-darwin12.5.0/i386/libjava/classpath/lib/classes
-fno-common
-fbootclasspath=./:../../../../gcc-4.9-20131210/libjava/classpath/lib/
-faux-classpath ccSlyCZfjx.zip -MD_ -MT java/awt/image.lo -MF
java/awt/image.deps -o ccSlyCZfjx.s


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2013-12-10 16:41 ` howarth at nitro dot med.uc.edu
@ 2013-12-10 16:43 ` howarth at nitro dot med.uc.edu
  2013-12-10 16:58 ` hjl.tools at gmail dot com
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2013-12-10 16:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #4 from Jack Howarth <howarth at nitro dot med.uc.edu> ---
(In reply to Jack Howarth from comment #3)
> /sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/./gcc/jc1
> /var/tmp//ccSlyCZfjx -fhash-synchronization -fuse-divide-subroutine
> -fcheck-references -fuse-boehm-gc -fnon-call-exceptions
> -fkeep-inline-functions -fPIC -feliminate-unused-debug-symbols -quiet
> -dumpbase ccSlyCZfjx -mmacosx-version-min=10.8.5 -m32 -mtune=generic
> -auxbase-strip java/awt/.libs/image.o -g -O2 -Wno-deprecated -version
> -ffilelist-file -ffloat-store -fomit-frame-pointer -fencoding=UTF-8
> -fbootstrap-classes
> -fsource-filename=/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-
> apple-darwin12.5.0/i386/libjava/classpath/lib/classes -fno-common
> -fbootclasspath=./:../../../../gcc-4.9-20131210/libjava/classpath/lib/
> -faux-classpath ccSlyCZfjx.zip -MD_ -MT java/awt/image.lo -MF
> java/awt/image.deps -o ccSlyCZfjx.s

opps, that actually was -mtune=core2 but -mtune=generic also segfaults jc1.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2013-12-10 16:43 ` howarth at nitro dot med.uc.edu
@ 2013-12-10 16:58 ` hjl.tools at gmail dot com
  2013-12-10 17:06 ` dominiq at lps dot ens.fr
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-10 16:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jack Howarth from comment #4)
> (In reply to Jack Howarth from comment #3)
> > /sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/./gcc/jc1
> > /var/tmp//ccSlyCZfjx -fhash-synchronization -fuse-divide-subroutine
> > -fcheck-references -fuse-boehm-gc -fnon-call-exceptions
> > -fkeep-inline-functions -fPIC -feliminate-unused-debug-symbols -quiet
> > -dumpbase ccSlyCZfjx -mmacosx-version-min=10.8.5 -m32 -mtune=generic
> > -auxbase-strip java/awt/.libs/image.o -g -O2 -Wno-deprecated -version
> > -ffilelist-file -ffloat-store -fomit-frame-pointer -fencoding=UTF-8
> > -fbootstrap-classes
> > -fsource-filename=/sw/src/fink.build/gcc49-4.9.0-1000/darwin_objdir/x86_64-
> > apple-darwin12.5.0/i386/libjava/classpath/lib/classes -fno-common
> > -fbootclasspath=./:../../../../gcc-4.9-20131210/libjava/classpath/lib/
> > -faux-classpath ccSlyCZfjx.zip -MD_ -MT java/awt/image.lo -MF
> > java/awt/image.deps -o ccSlyCZfjx.s
> 
> opps, that actually was -mtune=core2 but -mtune=generic also segfaults jc1.

What is the equivalent of -march=?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2013-12-10 16:58 ` hjl.tools at gmail dot com
@ 2013-12-10 17:06 ` dominiq at lps dot ens.fr
  2013-12-10 18:43 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-10 17:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> What is the equivalent of -march=?

I configure with --with-arch=corei7 --with-cpu=corei7.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2013-12-10 17:06 ` dominiq at lps dot ens.fr
@ 2013-12-10 18:43 ` hjl.tools at gmail dot com
  2013-12-10 18:44 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-10 18:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
classpath/java/awt/image/SinglePixelPackedSampleModel.java
is used on Linux.  Is there a way to compile it by hand
on Linux?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2013-12-10 18:43 ` hjl.tools at gmail dot com
@ 2013-12-10 18:44 ` hjl.tools at gmail dot com
  2013-12-10 20:10 ` octoploid at yandex dot com
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-10 18:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #7)
> classpath/java/awt/image/SinglePixelPackedSampleModel.java
> is used on Linux.  Is there a way to compile it by hand
^^^^^ I meant "isn't used".
> on Linux?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (8 preceding siblings ...)
  2013-12-10 18:44 ` hjl.tools at gmail dot com
@ 2013-12-10 20:10 ` octoploid at yandex dot com
  2013-12-10 20:30 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: octoploid at yandex dot com @ 2013-12-10 20:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

Markus Trippelsdorf <octoploid at yandex dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |octoploid at yandex dot com

--- Comment #9 from Markus Trippelsdorf <octoploid at yandex dot com> ---
This issue also happens when building LLVM.

Reduced:

markus@x4 llvm_build % cat test.ii
template <typename _Iterator> struct A;
template <typename _Tp> struct A<_Tp *> {
  typedef _Tp value_type;
  typedef int difference_type;
};
template <typename _Compare> struct B {};
template <typename _Compare> struct C {
  _Compare _M_comp;
  template <typename _Value, typename _Iterator>
  int operator()(_Value &p1, _Iterator p2) {
    return _M_comp(p1, *p2);
  }
};
template <typename _Compare> C<_Compare> __val_comp_iter(B<_Compare>);
template <typename _RandomAccessIterator, typename _Compare>
void __unguarded_linear_insert(_RandomAccessIterator p1, _Compare p2) {
  typename A<_RandomAccessIterator>::value_type a;
  _RandomAccessIterator b = p1;
  --b;
  while (p2(a, b)) {
    *p1 = 0;
    p1 = b;
    --b;
  }
}
template <typename _RandomAccessIterator, typename _Compare>
void __insertion_sort(_RandomAccessIterator, _Compare p2) {
  for (_RandomAccessIterator c;; ++c)
    __unguarded_linear_insert(c, __val_comp_iter(p2));
}
template <typename _RandomAccessIterator, typename _Distance, typename
_Compare>
void __chunk_insertion_sort(_RandomAccessIterator, _Distance, _Compare p3) {
  _RandomAccessIterator d;
  __insertion_sort(d, p3);
}
template <typename _RandomAccessIterator, typename _Pointer, typename _Compare>
void __merge_sort_with_buffer(_RandomAccessIterator p1, _Pointer, _Compare p3)
{
  __chunk_insertion_sort(p1, 0, p3);
}
template <typename _RandomAccessIterator, typename _Pointer, typename
_Distance,
          typename _Compare>
void __stable_sort_adaptive(_RandomAccessIterator, _Pointer, _Distance,
                            _Compare p4) {
  _RandomAccessIterator e;
  __merge_sort_with_buffer(e, 0, p4);
}
template <typename _RandomAccessIterator, typename _Compare>
void __stable_sort(_RandomAccessIterator p1, _Compare p2) {
  __stable_sort_adaptive(
      p1, 0, typename A<_RandomAccessIterator>::difference_type(), p2);
}
template <typename _RandomAccessIterator, typename _Compare>
void stable_sort(_RandomAccessIterator, _RandomAccessIterator p2, _Compare) {
  B<_Compare> f;
  __stable_sort(p2, f);
}
class D {
public:
  void m_fn1();
};
class F {
  struct G {
    D MFI;
    int operator()(int p1, int p2) {
      if (p1)
        return 0;
      if (p2)
        return 1;
      MFI.m_fn1();
    }
  };
  void m_fn1(int &p1) const;
};
void F::m_fn1(int &p1) const {
  int *g, *h;
  stable_sort(h, g, G());
}

markus@x4 llvm_build % g++ -O2 -c test.ii
test.ii: In member function ‘void F::m_fn1(int&) const’:
test.ii:74:6: internal compiler error: in add_old_iv_candidates, at
tree-ssa-loop-ivopts.c:2541
>From gcc-bugs-return-437239-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Dec 10 20:24:18 2013
Return-Path: <gcc-bugs-return-437239-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7841 invoked by alias); 10 Dec 2013 20:24:17 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7799 invoked by uid 48); 10 Dec 2013 20:24:13 -0000
From: "octoploid at yandex dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
Date: Tue, 10 Dec 2013 20:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: octoploid at yandex dot com
X-Bugzilla-Status: WAITING
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-59445-4-lc402riLyk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59445-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59445-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg00894.txt.bz2
Content-length: 420

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY445

Markus Trippelsdorf <octoploid at yandex dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amker.cheng at gmail dot com

--- Comment #10 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Started with r205848.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (9 preceding siblings ...)
  2013-12-10 20:10 ` octoploid at yandex dot com
@ 2013-12-10 20:30 ` hjl.tools at gmail dot com
  2013-12-10 20:49 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-10 20:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-apple-darwin13       |
             Status|WAITING                     |NEW
               Host|x86_64-apple-darwin13       |
              Build|x86_64-apple-darwin13       |


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (10 preceding siblings ...)
  2013-12-10 20:30 ` hjl.tools at gmail dot com
@ 2013-12-10 20:49 ` dominiq at lps dot ens.fr
  2013-12-11  0:46 ` howarth at nitro dot med.uc.edu
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-10 20:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Started with r205848.

Well, the assert at line 2541 has been introduced in the revision:

+    gcc_assert (gimple_bb (phi) == data->current_loop->header);

and it was in the original patch et
http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00630.html, but without
explanation for it.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (11 preceding siblings ...)
  2013-12-10 20:49 ` dominiq at lps dot ens.fr
@ 2013-12-11  0:46 ` howarth at nitro dot med.uc.edu
  2013-12-11  1:01 ` amker.cheng at gmail dot com
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2013-12-11  0:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #12 from Jack Howarth <howarth at nitro dot med.uc.edu> ---
Added Jeff Law since he reviewed and approved the offending patch.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (12 preceding siblings ...)
  2013-12-11  0:46 ` howarth at nitro dot med.uc.edu
@ 2013-12-11  1:01 ` amker.cheng at gmail dot com
  2013-12-11  5:49 ` amker.cheng at gmail dot com
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: amker.cheng at gmail dot com @ 2013-12-11  1:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #13 from bin.cheng <amker.cheng at gmail dot com> ---
Sorry for bothering, I have reverted the patch.  Will investigate it.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (13 preceding siblings ...)
  2013-12-11  1:01 ` amker.cheng at gmail dot com
@ 2013-12-11  5:49 ` amker.cheng at gmail dot com
  2013-12-11  5:54 ` amker.cheng at gmail dot com
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: amker.cheng at gmail dot com @ 2013-12-11  5:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #14 from bin.cheng <amker.cheng at gmail dot com> ---
I found out the root cause of this ICE and will use the simplified code given
by comment#9 as an example.

The gimple dump before IVOPT is like:

  <bb 2>:

  <bb 3>:
  # c_2 = PHI <c_5(D)(2), c_3(9)>
  __val_comp_iter<F::G> (D.4949);
  p2 = D.4950;
  c_6 = c_2 + 4294967292;
  _21 = MEM[(int *)c_2 + 4294967292B];
  if (a_11(D) != 0)
    goto <bb 4>;
  else
    goto <bb 5>;

  <bb 4>:
  c_3 = c_2 + 4;
  goto <bb 9>;

  <bb 5>:
  goto <bb 7>;

  <bb 6>:
  # c_23 = PHI <c_28(11), c_7(10)>
  # _24 = PHI <_29(11), _22(10)>

  <bb 7>:
  # c_20 = PHI <c_15(6), c_2(5)>
  # c_15 = PHI <c_23(6), c_6(5)>
  # _26 = PHI <_24(6), _21(5)>
  if (_26 != 0)
    goto <bb 11>;
  else
    goto <bb 8>;

  <bb 8>:
  D::m_fn1 (&MEM[(struct G *)&p2].MFI);
  if (_13(D) != 0)
    goto <bb 10>;
  else
    goto <bb 4>;

  <bb 9>:
  goto <bb 3>;

  <bb 10>:
  *c_20 = 0;
  c_7 = c_15 + 4294967292;
  _22 = *c_7;
  goto <bb 6>;

  <bb 11>:
  *c_20 = 0;
  c_28 = c_15 + 4294967292;
  _29 = *c_28;
  goto <bb 6>;

With the patch:
STEP1: # c_20 = PHI <c_15(6), c_2(5)> is recognized as an iv. 
STEP2: Since # c_15 = PHI <c_23(6), c_6(5)> comes from a merging conditional
branches, it shouldn't be marked as a biv in mark_bivs.
STEP3: When mark_bivs handling "# c_20 = PHI <c_15(6), c_2(5)>",it should know
that this is a peeled iv and not mark either iv(c_20) or incr_iv(c_15) as bivs.

Unfortunately, this patch should add logic in mark_bivs to skip peeled iv,
rather than give an assert later when adding candidates for bivs.

The following patch should fix this problem:
@@ -1074,7 +1074,7 @@ find_bivs (struct ivopts_data *data)
 static void
 mark_bivs (struct ivopts_data *data)
 {
-  gimple phi;
+  gimple phi, def;
   tree var;
   struct iv *iv, *incr_iv;
   struct loop *loop = data->current_loop;
@@ -1090,6 +1090,13 @@ mark_bivs (struct ivopts_data *data)
     continue;

       var = PHI_ARG_DEF_FROM_EDGE (phi, loop_latch_edge (loop));
+      def = SSA_NAME_DEF_STMT (var);
+      /* Don't mark iv peeled from other one as biv.  */
+      if (def
+      && gimple_code (def) == GIMPLE_PHI
+      && gimple_bb (def) == loop->header)
+    continue;
+
       incr_iv = get_iv (data, var);
       if (!incr_iv)
     continue;

PS, the example code can be optimized with fixed version patch by recognizing
more address ivs.  I attached the generated assembly code for arm cortex-m3.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (14 preceding siblings ...)
  2013-12-11  5:49 ` amker.cheng at gmail dot com
@ 2013-12-11  5:54 ` amker.cheng at gmail dot com
  2013-12-12  6:47 ` amker.cheng at gmail dot com
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: amker.cheng at gmail dot com @ 2013-12-11  5:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #15 from bin.cheng <amker.cheng at gmail dot com> ---
Created attachment 31414
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31414&action=edit
The generated assembly with/without patch for code in comment #9 on cortex-m3


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (15 preceding siblings ...)
  2013-12-11  5:54 ` amker.cheng at gmail dot com
@ 2013-12-12  6:47 ` amker.cheng at gmail dot com
  2013-12-12 13:38 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: amker.cheng at gmail dot com @ 2013-12-12  6:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #16 from bin.cheng <amker.cheng at gmail dot com> ---
I fixed the reported problem and posted new patch at
http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01159.html
Apology that I missed java in bootstrap for previous patch.  This version
passes bootstrap and test for c,c++,lto,fortran,java,go,objc,obj_c++ on x86_64.
 I am not sure if the java case is covered by bootstrap, or other applications.
 If it's in other application, could anyone help verifying that the issue is
addressed on apple-darwin?

Thanks.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (16 preceding siblings ...)
  2013-12-12  6:47 ` amker.cheng at gmail dot com
@ 2013-12-12 13:38 ` dominiq at lps dot ens.fr
  2013-12-13  1:46 ` amker.cheng at gmail dot com
  2013-12-14 15:56 ` dominiq at lps dot ens.fr
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-12 13:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #17 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I fixed the reported problem and posted new patch at 
> http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01159.html
> Apology that I missed java in bootstrap for previous patch.  This version 
> passes bootstrap and test for c,c++,lto,fortran,java,go,objc,obj_c++ on x86_64.  

Well, it has been a long time without libjava breaking bootstrap!

> I am not sure if the java case is covered by bootstrap, or other applications.  
> If it's in other application, could anyone help verifying that the issue is 
> addressed on apple-darwin?

I have bootstrapped end regtested revision 205924 with the patch on
x86_64-apple-darwin13 without any problem.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (17 preceding siblings ...)
  2013-12-12 13:38 ` dominiq at lps dot ens.fr
@ 2013-12-13  1:46 ` amker.cheng at gmail dot com
  2013-12-14 15:56 ` dominiq at lps dot ens.fr
  19 siblings, 0 replies; 21+ messages in thread
From: amker.cheng at gmail dot com @ 2013-12-13  1:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

--- Comment #18 from bin.cheng <amker.cheng at gmail dot com> ---
Hi Dominique d'Humieres,
Thanks for verifying it.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug tree-optimization/59445] [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541
  2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
                   ` (18 preceding siblings ...)
  2013-12-13  1:46 ` amker.cheng at gmail dot com
@ 2013-12-14 15:56 ` dominiq at lps dot ens.fr
  19 siblings, 0 replies; 21+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-14 15:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59445

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #19 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
AFAICT this is fixed by revision 205959:

http://gcc.gnu.org/viewcvs/gcc?view=revision&sortby=date&revision=205959
Author:    amker
Date:    Fri Dec 13 11:36:22 2013 UTC (28 hours, 17 minutes ago)
Changed paths:    8
Log Message:    
    PR tree-optimization/58296
    PR tree-optimization/41488
    * tree-scalar-evolution.c: Include necessary header files.
    (simplify_peeled_chrec): New function.
    (analyze_evolution_in_loop): New static variable.
    Call simplify_peeled_chrec.
    * tree-ssa-loop-ivopts.c (mark_bivs): Don't mark peeled IV as biv.
    (add_old_iv_candidates): Don't add candidate for peeled IV.
    * tree-affine.h (aff_combination_zero_p): New function.

    PR tree-optimization/58296
    PR tree-optimization/41488
    * gcc.dg/tree-ssa/scev-7.c: New test.
    * gcc.dg/pr41488.c: New test.
    * g++.dg/pr59445.C: New test.

Closing as FIXED.


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-12-14 15:56 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-10 11:13 [Bug tree-optimization/59445] New: [4.9 Regression] ICE in add_old_iv_candidates, at tree-ssa-loop-ivopts.c:2541 dominiq at lps dot ens.fr
2013-12-10 11:50 ` [Bug tree-optimization/59445] " rguenth at gcc dot gnu.org
2013-12-10 16:05 ` dominiq at lps dot ens.fr
2013-12-10 16:29 ` hjl.tools at gmail dot com
2013-12-10 16:41 ` howarth at nitro dot med.uc.edu
2013-12-10 16:43 ` howarth at nitro dot med.uc.edu
2013-12-10 16:58 ` hjl.tools at gmail dot com
2013-12-10 17:06 ` dominiq at lps dot ens.fr
2013-12-10 18:43 ` hjl.tools at gmail dot com
2013-12-10 18:44 ` hjl.tools at gmail dot com
2013-12-10 20:10 ` octoploid at yandex dot com
2013-12-10 20:30 ` hjl.tools at gmail dot com
2013-12-10 20:49 ` dominiq at lps dot ens.fr
2013-12-11  0:46 ` howarth at nitro dot med.uc.edu
2013-12-11  1:01 ` amker.cheng at gmail dot com
2013-12-11  5:49 ` amker.cheng at gmail dot com
2013-12-11  5:54 ` amker.cheng at gmail dot com
2013-12-12  6:47 ` amker.cheng at gmail dot com
2013-12-12 13:38 ` dominiq at lps dot ens.fr
2013-12-13  1:46 ` amker.cheng at gmail dot com
2013-12-14 15:56 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).