public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
@ 2015-02-27 17:20 doko at gcc dot gnu.org
  2015-03-02  8:45 ` [Bug target/65240] " rguenth at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: doko at gcc dot gnu.org @ 2015-02-27 17:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65240
           Summary: [5 Regression] ICE (insn does not satisfy its
                    constraints) on powerpc64le-linux-gnu
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

trunk r221042

$ g++ -c -g -O3 -ffast-math modules_mod.ii 
modules_mod.ii: In member function 'uint32_t D::m_fn3()':
modules_mod.ii:69:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 279 463 432 2 (set (reg:DF 98 21 [360])
        (mem/u/c:DF (lo_sum:DI (reg:DI 10 10)
                (unspec:DI [
                        (symbol_ref/u:DI ("*.LC7") [flags 0x82])
                        (reg:DI 2 2)
                    ] UNSPEC_TOCREL)) [1  S8 A64])) modules_mod.ii:64 499
{*movdf_hardfloat64}
     (expr_list:REG_EQUIV (const_double:DF -5.0e-1 [-0x0.8p+0])
        (nil)))
modules_mod.ii:69:1: internal compiler error: in extract_constrain_insn, at
recog.c:2246
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

$ cat modules_mod.ii
typedef int uint32_t;
extern "C" double atan(double);
template <typename T, typename U> T lerp(T p1, T p2, U p3) {
  return p1 + (p2 - p1) * p3;
}

template <class> class audio_module {
public:
  float *ins[];
};

struct A {
  double w1;
  double w2;
  double process___trans_tmp_7;
  double process___trans_tmp_6;
  void m_fn1(double p1) {
    double &a = w1;
    if (process___trans_tmp_6 < process___trans_tmp_7)
      a = 0.0;
    double b = p1 - w1 - w2;
    w1 = b;
  }
};
class B {
public:
  float &operator[](int) {}
};
struct C {
  B data;
  int get_interp_1616_ppos;
  int get_interp_1616_pppos;
  float m_fn2(int p1) {
    float c(p1);
    return lerp(data[get_interp_1616_ppos], data[get_interp_1616_pppos], c);
  }
};
struct rotary_speaker_metadata;
class D : audio_module<rotary_speaker_metadata> {
  uint32_t phase_l, phase_h, dphase_h;
  C delay;
  A crossover1r, crossover2l, damper1l, damper1r;
  uint32_t m_fn3();
};
double d, e, f, g, h;
int j;
float k;
uint32_t D::m_fn3() {
  int l;
  for (int i;; i++) {
    double m = atan(ins[1][i]);
    int n = phase_l, o(phase_h), p = l;
    double v = n / 32768.0;
    j = 8 + phase_l / 32768.0;
    l = 8 + 8 * v - 0.3849;
    float q = delay.m_fn2(o) - g * k * delay.m_fn2(o),
          r = g * delay.m_fn2(o) + k * delay.m_fn2(p);
    damper1l.m_fn1(q);
    f = lerp(0.5, phase_h / 65536.0, h);
    float s = f;
    damper1r.m_fn1(r);
    e = lerp(0.5, j / 65536.0, h);
    d = m * e;
    float t = d;
    crossover2l.m_fn1(s);
    crossover1r.m_fn1(t);
    phase_l = phase_h = dphase_h;
  }
}


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
@ 2015-03-02  8:45 ` rguenth at gcc dot gnu.org
  2015-03-02 11:36 ` mpolacek at gcc dot gnu.org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-02  8:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
  2015-03-02  8:45 ` [Bug target/65240] " rguenth at gcc dot gnu.org
@ 2015-03-02 11:36 ` mpolacek at gcc dot gnu.org
  2015-03-02 11:40 ` trippels at gcc dot gnu.org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-02 11:36 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I can't reproduce.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
  2015-03-02  8:45 ` [Bug target/65240] " rguenth at gcc dot gnu.org
  2015-03-02 11:36 ` mpolacek at gcc dot gnu.org
@ 2015-03-02 11:40 ` trippels at gcc dot gnu.org
  2015-03-02 12:22 ` doko at gcc dot gnu.org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-02 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |trippels at gcc dot gnu.org
         Resolution|---                         |WORKSFORME

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> I can't reproduce.

Neither can I.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-02 11:40 ` trippels at gcc dot gnu.org
@ 2015-03-02 12:22 ` doko at gcc dot gnu.org
  2015-03-02 12:23 ` doko at gcc dot gnu.org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: doko at gcc dot gnu.org @ 2015-03-02 12:22 UTC (permalink / raw)
  To: gcc-bugs

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WORKSFORME                  |---

--- Comment #3 from Matthias Klose <doko at gcc dot gnu.org> ---
another occurrence:

$ gcc -std=gnu99 -c -g -O3 -ffast-math filters.i 
filters.c: In function 'flam3_create_spatial_filter':
filters.c:270:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 388 2863 2731 10 (set (reg:DF 104 27 [1124])
        (mem/u/c:DF (lo_sum:DI (reg:DI 24 24)
                (unspec:DI [
                        (symbol_ref/u:DI ("*.LC23") [flags 0x82])
                        (reg:DI 2 2)
                    ] UNSPEC_TOCREL)) [1  S8 A64])) filters.c:251 499
{*movdf_hardfloat64}
     (expr_list:REG_EQUIV (const_double:DF -1.0e+0 [-0x0.8p+1])
        (nil)))
filters.c:270:1: internal compiler error: in extract_constrain_insn, at
recog.c:2246
Please submit a full bug report,
with preprocessed source if appropriate.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-03-02 12:22 ` doko at gcc dot gnu.org
@ 2015-03-02 12:23 ` doko at gcc dot gnu.org
  2015-03-02 12:25 ` doko at gcc dot gnu.org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: doko at gcc dot gnu.org @ 2015-03-02 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Matthias Klose <doko at gcc dot gnu.org> ---
Created attachment 34918
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34918&action=edit
preprocessed source


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-03-02 12:23 ` doko at gcc dot gnu.org
@ 2015-03-02 12:25 ` doko at gcc dot gnu.org
  2015-03-02 12:49 ` trippels at gcc dot gnu.org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: doko at gcc dot gnu.org @ 2015-03-02 12:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Matthias Klose <doko at gcc dot gnu.org> ---
reduced test case for filters.i:

double a, b, d, e;
c, f, g;
double fn1() {
  double t;
  if (t < 0.0)
    t = -t;
  if (t < 1.0)
    return 1.0 - t;
  t = -t;
  if (t < .5)
    return t * t;
}

double fn2(double p1) {
  if (p1 < 1)
    b = p1 * p1 / 3.0;
  if (p1)
    return 6.0 * p1 * p1;
}

double fn3(double p1) {
  if (c == 0)
    fn4();
  else if (c == 2)
    return fn1();
  else if (c == 5)
    return fn2(p1);
  else if (c == 3) {
    d = p1 * p1;
    return d;
  }
}

fn5() {
  double h, j;
  int k = f, i;
  h = a;
  i = 0;
  for (; i < k; i++) {
    g = 0;
    for (; g < k;) {
      e = ((i + 1.0) / k - 1.0) * h;
      j = (2.0 * g - 1.0) * fn3(e) * fn3(j);
    }
  }
}


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-03-02 12:25 ` doko at gcc dot gnu.org
@ 2015-03-02 12:49 ` trippels at gcc dot gnu.org
  2015-03-03 20:42 ` msebor at gcc dot gnu.org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-02 12:49 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5840 bytes --]

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-02
     Ever confirmed|0                           |1

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Attached unreduced testcase ICEs for me. Reduced testcase from comment 5
doesn't.

trippels@gcc2-power8 ~ % cat filters.i
int b, d, e;
double c;
double *f;
int
fn1(double p1) {
  if (p1 && p1 <= 1)
    return 1;
  return 0;
}
double fn2(double p1) {
  if (p1 < 0)
    p1 = -p1;
  if (p1 < 1)
    return -p1 - 1;
  if (p1 < .5)
    return .75 - p1 * p1;
}
double fn3(double p1) {
  int a;
  if (p1 < 0)
    return a * p1 + 3.0;
  if (p1 < 2)
    return 1 / 6.0 * p1 * p1 * p1;
}
double fn4(double p1) {
  if (b == 0)
    fn5(p1);
  else if (b == 1)
    return fn1(p1);
  else if (b == 3)
    return fn2(p1);
  else if (b == 5)
    return fn3(p1);
}
void
fn6() {
  double g, h;
  int j = e, i;
  g = e;
  for (; j; i++) {
    d = 0;
    for (; d < 1; d++) {
      c = (i + 1.0) / 0.1 - 1;
      h = ((2.0 * d + 1) / j - 1) * g;
      *f = fn4(c) * fn4(h);
    }
  }
}

trippels@gcc2-power8 ~ % ~/gcc_test/usr/local/bin/gcc -w -std=gnu99 -c -O3
-ffast-math filters.i
filters.i: In function ‘fn6’:
filters.i:48:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 86 598 599 3 (set (reg:DF 98 21 [345])
        (mem/u/c:DF (lo_sum:DI (reg:DI 8 8)
                (unspec:DI [
                        (symbol_ref/u:DI ("*.LC8") [flags 0x82])
                        (reg:DI 2 2)
                    ] UNSPEC_TOCREL)) [2  S8 A64])) filters.i:44 499
{*movdf_hardfloat64}
     (expr_list:REG_EQUIV (const_double:DF -1.0e+0 [-0x0.8p+1])
        (nil)))
filters.i:48:1: internal compiler error: in extract_constrain_insn, at
recog.c:2246
0x1075f653 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/gcc/rtl-error.c:110
0x1075f6b7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../gcc/gcc/rtl-error.c:121
0x107264fb extract_constrain_insn(rtx_insn*)
        ../../gcc/gcc/recog.c:2246
0x106ff137 reload_cse_simplify_operands
        ../../gcc/gcc/postreload.c:430
0x10700723 reload_cse_simplify
        ../../gcc/gcc/postreload.c:207
0x10700723 reload_cse_regs_1
        ../../gcc/gcc/postreload.c:246
0x107009e7 reload_cse_regs
        ../../gcc/gcc/postreload.c:94
0x107009e7 execute
        ../../gcc/gcc/postreload.c:2367
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-478985-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 02 13:38:46 2015
Return-Path: <gcc-bugs-return-478985-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15539 invoked by alias); 2 Mar 2015 13:38:46 -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 15452 invoked by uid 48); 2 Mar 2015 13:38:38 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65276] New: [5 Regression] LTO: ICE add_type_duplicate, at ipa-devirt.c:1462
Date: Mon, 02 Mar 2015 13:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc attachments.created
Message-ID: <bug-65276-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: 2015-03/txt/msg00129.txt.bz2
Content-length: 1040

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide276

            Bug ID: 65276
           Summary: [5 Regression] LTO: ICE add_type_duplicate, at
                    ipa-devirt.c:1462
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org

Created attachment 34919
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4919&actioníit
File "one.ii" - compile with -O0 (g++ -w -c -flto -O0 -std=c++11 one.ii)

Seems to be introduced in the last few days (max. 2 weeks) as it compiled
before.

The attached program fails with:
lto1: internal compiler error: in add_type_duplicate, at ipa-devirt.c:1462

Compile with:
  g++ -w -c -flto -O0 -std=c++11 one.ii
  g++ -w -c -flto -O2 -std=c++11 two.ii
  gcc -r -nostdlib -O0 -Wodr -flto-odr-type-merging one.o two.o


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-03-02 12:49 ` trippels at gcc dot gnu.org
@ 2015-03-03 20:42 ` msebor at gcc dot gnu.org
  2015-03-03 22:15 ` dje at gcc dot gnu.org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-03-03 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
I also cannot reproduce the ICE with the original test case but I can confirm
it with the test case from comment #6. The test case isn't strictly conforming
(as pointed out by a number warnings when -Wall is used).  Resolving the
problems (declaring fn5, adding the missing return statements, or initializing
the local variables a in fn3) makes the ICE disappear.

The problem was introduced in r219854:

commit 5379d8d457b300219d3d8eda38caaa9916f98078
Author: dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Jan 19 18:33:24 2015 +0000

            * config/rs6000/default64.h: Include rs6000-cpus.def.
            (TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
            (TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
            * config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
            and POWER8.
            * config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
            POWER8.
            * config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
            pseudo-op to specify assembler dialect.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219854
138bc75d-0d04-0410-961f-82ee72b054a4


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-03-03 20:42 ` msebor at gcc dot gnu.org
@ 2015-03-03 22:15 ` dje at gcc dot gnu.org
  2015-03-03 22:27 ` meissner at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dje at gcc dot gnu.org @ 2015-03-03 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from David Edelsohn <dje at gcc dot gnu.org> ---
Comment #7 means that it fails with -mcpu=power8.

What feature really exposes the problem?  -mcpu=power7? -mcpu=power6?
-mcpu=power5?

Thanks, David


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-03-03 22:15 ` dje at gcc dot gnu.org
@ 2015-03-03 22:27 ` meissner at gcc dot gnu.org
  2015-03-03 22:31 ` msebor at gcc dot gnu.org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-03 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Michael Meissner <meissner at gcc dot gnu.org> ---
It is likely due to a combination of -ffast-math and -mupper-regs on
power7/power8.  This is a problem I've seen before, but I thought I had
squashed it.

Basically, the code I've seen before, you have code that uses enough registers
that it wants to allocate registers using the traditional Altivec registers,
and you load up some constants.  If you don't use -ffast-math, then everything
is fine, because the constant is pushed to the constant pool before register
allocation begins.  However, due to wanting the constant around so that
reciprocal math can be done (i.e. -ffast-math), the constant is kept around
until register allocation time.  During register allocation time, we allocate a
FPR for the constant because it wants to use d-form addressing (reg+offset). 
However, one of the post reload passes (usually gcse-after-reload) goes in and
decides to change the load from loading up a FPR register to loading it
directly to an Altivec register and fails because we don't have d-form
addressing for Altivec registers.  The usual case is reload loads up a FPR and
then does a move to the Atlivec register, and that gets combined.  I think I've
see it also happen, where you are loading the same constant twice, and GCSE
decides to use the Altivec version.

I'll try to look at it tomorrow.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-03-03 22:27 ` meissner at gcc dot gnu.org
@ 2015-03-03 22:31 ` msebor at gcc dot gnu.org
  2015-03-03 22:49 ` law at redhat dot com
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-03-03 22:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to David Edelsohn from comment #8)

The ICE is triggered by -mcpu=power8 and disappears with -mcpu=power7 and
prior.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-03-03 22:31 ` msebor at gcc dot gnu.org
@ 2015-03-03 22:49 ` law at redhat dot com
  2015-03-04 18:20 ` meissner at gcc dot gnu.org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: law at redhat dot com @ 2015-03-03 22:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jeffrey A. Law <law at redhat dot com> ---
Martin,

A lot of folks use "delta" to do testcase reduction.  Delta is pretty dumb in
that it removes code, runs a test (defined by the developer) and if the failure
is still there, removes more code, else restore and remove something else and
iterate.

As such it's common for tests to have undefined behaviour if they were to be
run.  But even a testcase with undefined behaviour shouldn't ever ICE or
segfault.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-03-03 22:49 ` law at redhat dot com
@ 2015-03-04 18:20 ` meissner at gcc dot gnu.org
  2015-03-04 21:22 ` meissner at gcc dot gnu.org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-04 18:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Michael Meissner <meissner at gcc dot gnu.org> ---
Created attachment 34952
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34952&action=edit
Initial patch to paper over the problem

This patch papers over the problem.  As I mentioned before this is an
interaction between -ffast-math and -mupper-regs-df.  I was able to replicate
it for both power7 and power8 targets, and turning off either -ffast-math or
-mupper-regs-df allowed the problem to compile.

I suspect that the logic in easy_fp_constant to keep the CONST_DOUBLE around to
reload time is no longer needed, and that reciprocal approximation does not
need the constant in the RTL, but uses the register notes.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2015-03-04 18:20 ` meissner at gcc dot gnu.org
@ 2015-03-04 21:22 ` meissner at gcc dot gnu.org
  2015-03-04 21:24 ` meissner at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-04 21:22 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |meissner at gcc dot gnu.org


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2015-03-04 21:22 ` meissner at gcc dot gnu.org
@ 2015-03-04 21:24 ` meissner at gcc dot gnu.org
  2015-03-16 19:31 ` meissner at gcc dot gnu.org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-04 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34952|0                           |1
        is obsolete|                            |

--- Comment #13 from Michael Meissner <meissner at gcc dot gnu.org> ---
Created attachment 34956
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34956&action=edit
Proposed patch to fix the problem

This patch appears to fix the problem (first patch was a bandaid).  I'm going
to test it before submitting it.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2015-03-04 21:24 ` meissner at gcc dot gnu.org
@ 2015-03-16 19:31 ` meissner at gcc dot gnu.org
  2015-03-19 23:33 ` meissner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-16 19:31 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34956|0                           |1
        is obsolete|                            |

--- Comment #14 from Michael Meissner <meissner at gcc dot gnu.org> ---
Created attachment 35040
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35040&action=edit
Latest patch

This patch completely eliminates the -ffast-math actions that keep non-0
floating point constants arround until reload time.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-03-16 19:31 ` meissner at gcc dot gnu.org
@ 2015-03-19 23:33 ` meissner at gcc dot gnu.org
  2015-03-19 23:37 ` meissner at gcc dot gnu.org
  2015-04-03 23:17 ` amodra at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-19 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Michael Meissner <meissner at gcc dot gnu.org> ---
Author: meissner
Date: Thu Mar 19 22:37:33 2015
New Revision: 221524

URL: https://gcc.gnu.org/viewcvs?rev=221524&root=gcc&view=rev
Log:
[gcc]
2015-03-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

    PR target/65240
    * config/rs6000/predicates.md (easy_fp_constant): Remove special
    -ffast-math handling that kept non-0 constants live in the RTL
    until reload.  Remove logic testing the number of instructions it
    took to create a constant in a GPR that was never used, due to a
    test for soft-float earlier.
    (memory_fp_constant): Delete, no longer used.

    * config/rs6000/rs6000.md (mov<MODE>_hardfloat): Remove
    alternatives for loading non-0 constants into GPRs for hard
    floating point that is no longer needed due to changes in
    easy_fp_constant.  Add support for loading 0.0 into GPRs.
    (mov<mode>_hardfloat32): Likewise.
    (mov<mode>_hardfloat64): Likewise.
    (mov<mode>_64bit_dm): Likewise.
    (movtd_64bit_nodm): Likewise.
    (pre-reload move FP constant define_split): Delete define_split,
    since it is no longer used.
    (extenddftf2_internal): Remove GHF constraints that are not valid
    for extenddftf2.

[gcc/testsuite]
2015-03-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

    PR target/65240
    * gcc/testsuite/g++.dg/pr65240.h: Add tests for PR 65240.
    * gcc/testsuite/g++.dg/pr65240-1.C: Likewise.
    * gcc/testsuite/g++.dg/pr65240-2.C: Likewise.
    * gcc/testsuite/g++.dg/pr65240-3.C: Likewise.
    * gcc/testsuite/g++.dg/pr65240-4.C: Likewise.


Added:
    trunk/gcc/testsuite/g++.dg/pr65240-1.C
    trunk/gcc/testsuite/g++.dg/pr65240-2.C
    trunk/gcc/testsuite/g++.dg/pr65240-3.C
    trunk/gcc/testsuite/g++.dg/pr65240-4.C
    trunk/gcc/testsuite/g++.dg/pr65240.h
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/predicates.md
    trunk/gcc/config/rs6000/rs6000.md
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2015-03-19 23:33 ` meissner at gcc dot gnu.org
@ 2015-03-19 23:37 ` meissner at gcc dot gnu.org
  2015-04-03 23:17 ` amodra at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: meissner at gcc dot gnu.org @ 2015-03-19 23:37 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

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

--- Comment #16 from Michael Meissner <meissner at gcc dot gnu.org> ---
Problem is believed to be fixed in subversion id 221524.


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

* [Bug target/65240] [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2015-03-19 23:37 ` meissner at gcc dot gnu.org
@ 2015-04-03 23:17 ` amodra at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: amodra at gcc dot gnu.org @ 2015-04-03 23:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Fri Apr  3 23:16:26 2015
New Revision: 221862

URL: https://gcc.gnu.org/viewcvs?rev=221862&root=gcc&view=rev
Log:
    PR target/65576
    PR target/65240
    * config/rs6000/predicates.md (zero_reg_mem_operand): Exclude
    0.0 constant unless TARGET_VSX.
    * config/rs6000/rs6000.md (extenddftf2_internal): Remove last
    alternative.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/predicates.md
    trunk/gcc/config/rs6000/rs6000.md


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

end of thread, other threads:[~2015-04-03 23:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 17:20 [Bug target/65240] New: [5 Regression] ICE (insn does not satisfy its constraints) on powerpc64le-linux-gnu doko at gcc dot gnu.org
2015-03-02  8:45 ` [Bug target/65240] " rguenth at gcc dot gnu.org
2015-03-02 11:36 ` mpolacek at gcc dot gnu.org
2015-03-02 11:40 ` trippels at gcc dot gnu.org
2015-03-02 12:22 ` doko at gcc dot gnu.org
2015-03-02 12:23 ` doko at gcc dot gnu.org
2015-03-02 12:25 ` doko at gcc dot gnu.org
2015-03-02 12:49 ` trippels at gcc dot gnu.org
2015-03-03 20:42 ` msebor at gcc dot gnu.org
2015-03-03 22:15 ` dje at gcc dot gnu.org
2015-03-03 22:27 ` meissner at gcc dot gnu.org
2015-03-03 22:31 ` msebor at gcc dot gnu.org
2015-03-03 22:49 ` law at redhat dot com
2015-03-04 18:20 ` meissner at gcc dot gnu.org
2015-03-04 21:22 ` meissner at gcc dot gnu.org
2015-03-04 21:24 ` meissner at gcc dot gnu.org
2015-03-16 19:31 ` meissner at gcc dot gnu.org
2015-03-19 23:33 ` meissner at gcc dot gnu.org
2015-03-19 23:37 ` meissner at gcc dot gnu.org
2015-04-03 23:17 ` amodra at gcc dot gnu.org

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).