public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
@ 2015-05-17 23:38 ` danglin at gcc dot gnu.org
  2015-05-17 23:42 ` danglin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-17 23:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
Introduced in r223034:

2015-05-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>

        * combine.c i(set_nonzero_bits_and_sign_copies): Split code updating
        rsp->sign_bit_copies and rsp->nonzero_bits into ...
        (update_rsp_from_reg_equal): This.  Also use REG_EQUAL note on src if
        present to get more accurate information about the number of sign bit
        copies and non zero bits.


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

* [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
  2015-05-17 23:38 ` [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006 danglin at gcc dot gnu.org
@ 2015-05-17 23:42 ` danglin at gcc dot gnu.org
  2015-05-18 11:52 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-17 23:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 35559
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35559&action=edit
Preprocessed source


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

* [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
  2015-05-17 23:38 ` [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006 danglin at gcc dot gnu.org
  2015-05-17 23:42 ` danglin at gcc dot gnu.org
@ 2015-05-18 11:52 ` rguenth at gcc dot gnu.org
  2015-05-22 17:12 ` danglin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-18 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |6.0


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

* [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-05-18 11:52 ` rguenth at gcc dot gnu.org
@ 2015-05-22 17:12 ` danglin at gcc dot gnu.org
  2015-05-25  7:21 ` thopre01 at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-22 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
This patch introduces this difference in assembly code of genpreds.c:

-       ldil L'-822083584,%r20
-       depdi 0,0+32-1,32,%r20
-       and %r22,%r20,%r20
-       cmpb,*<> %r0,%r20,L$0361
-       shladd,l %r31,3,%r28,%r20
+       ldil L'-822083584,%r21
+       and %r22,%r21,%r21
+       cmpb,*<> %r0,%r21,L$0361
+       shladd,l %r31,3,%r28,%r21

The depdi instruction clearing the most significant of register %r20
is no longer generated.  The 32-bit immediate value loaded by the ldil
instruction is sign extended to 64 bits.


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

* [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-05-22 17:12 ` danglin at gcc dot gnu.org
@ 2015-05-25  7:21 ` thopre01 at gcc dot gnu.org
  2015-05-25 11:32 ` dave.anglin at bell dot net
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: thopre01 at gcc dot gnu.org @ 2015-05-25  7:21 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Preud'homme <thopre01 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-25
           Assignee|unassigned at gcc dot gnu.org      |thopre01 at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #4 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> ---
The patch set out to use information from REG_EQUAL notes to get more accurate
nonzero_bits value. When compiling the testcase with commit r223033 (the one
just before the bug is seen) and options -O2 -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables I can see:

(insn 360 358 361 27 (set (reg:DI 549)
        (const_int -822083584 [0xffffffffcf000000]))
../../gcc/gcc/genpreds.c:983 123 {*pa.md:4196}
     (expr_list:REG_EQUAL (const_int 3472883712 [0xcf000000])
        (nil)))

Here the REG_EQUAL does not match the value that is set: the 32 most
significant bits are zero. Which is why combine decide that the set of
zero_extract can be removed. Looking at the dumps of the various pass,
everything looks fine until cse1 where instruction 360 is replaced from:

(insn 360 359 361 32 (set (reg:DI 549)
        (lo_sum:DI (reg:DI 550)
            (const_int -822083584 [0xffffffffcf000000])))
../../gcc/gcc/genpreds.c:983 93 {*pa.md:2773}
     (expr_list:REG_EQUAL (const_int 3472883712 [0xcf000000])
        (nil)))

to:

(insn 360 359 361 32 (set (reg:DI 549)
        (const_int -822083584 [0xffffffffcf000000]))
../../gcc/gcc/genpreds.c:983 123 {*pa.md:4196}
     (expr_list:REG_DEAD (reg:DI 550)
        (expr_list:REG_EQUAL (const_int 3472883712 [0xcf000000])
            (nil))))

without the REG_EQUAL note being updated. The replacement is made by the else
if in cse.c with the following comment:

/* Look for a substitution that makes a valid insn.  */

I'm not sure what component is at fault here (my guess is that cse is not
expected to update the note directly but probably some other function) and I am
thus not very sure who to reassign this bug to.


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

* [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2015-05-25  7:21 ` thopre01 at gcc dot gnu.org
@ 2015-05-25 11:32 ` dave.anglin at bell dot net
  2015-05-28  1:10 ` [Bug target/66148] " danglin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: dave.anglin at bell dot net @ 2015-05-25 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from dave.anglin at bell dot net ---
On 2015-05-25, at 3:21 AM, thopre01 at gcc dot gnu.org wrote:

> Here the REG_EQUAL does not match the value that is set: the 32 most
> significant bits are zero. Which is why combine decide that the set of
> zero_extract can be removed. Looking at the dumps of the various pass,
> everything looks fine until cse1 where instruction 360 is replaced from:
> 
> (insn 360 359 361 32 (set (reg:DI 549)
>        (lo_sum:DI (reg:DI 550)
>            (const_int -822083584 [0xffffffffcf000000])))
> ../../gcc/gcc/genpreds.c:983 93 {*pa.md:2773}
>     (expr_list:REG_EQUAL (const_int 3472883712 [0xcf000000])
>        (nil)))

The note appears wrong before cse1.

Dave
--
John David Anglin       dave.anglin@bell.net


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

* [Bug target/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2015-05-25 11:32 ` dave.anglin at bell dot net
@ 2015-05-28  1:10 ` danglin at gcc dot gnu.org
  2015-05-28  1:13 ` danglin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-28  1:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> ---
Author: danglin
Date: Thu May 28 01:09:59 2015
New Revision: 223791

URL: https://gcc.gnu.org/viewcvs?rev=223791&root=gcc&view=rev
Log:
        PR target/66148
        * config/pa/pa.c (pa_emit_move_sequence): Correct placement of
        REG_EQUAL note when doing insert.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/pa/pa.c


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

* [Bug target/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2015-05-28  1:10 ` [Bug target/66148] " danglin at gcc dot gnu.org
@ 2015-05-28  1:13 ` danglin at gcc dot gnu.org
  2015-05-28  1:16 ` danglin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-28  1:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from John David Anglin <danglin at gcc dot gnu.org> ---
Author: danglin
Date: Thu May 28 01:12:59 2015
New Revision: 223792

URL: https://gcc.gnu.org/viewcvs?rev=223792&root=gcc&view=rev
Log:
        PR target/66148
        * config/pa/pa.c (pa_emit_move_sequence): Correct placement of
        REG_EQUAL note when doing insert.


Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/config/pa/pa.c


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

* [Bug target/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2015-05-28  1:13 ` danglin at gcc dot gnu.org
@ 2015-05-28  1:16 ` danglin at gcc dot gnu.org
  2015-05-28  1:18 ` danglin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-28  1:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from John David Anglin <danglin at gcc dot gnu.org> ---
Author: danglin
Date: Thu May 28 01:15:46 2015
New Revision: 223793

URL: https://gcc.gnu.org/viewcvs?rev=223793&root=gcc&view=rev
Log:
        PR target/66148
        * config/pa/pa.c (pa_emit_move_sequence): Correct placement of
        REG_EQUAL note when doing insert.


Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/pa/pa.c


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

* [Bug target/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2015-05-28  1:16 ` danglin at gcc dot gnu.org
@ 2015-05-28  1:18 ` danglin at gcc dot gnu.org
  2015-05-28  1:19 ` danglin at gcc dot gnu.org
  2015-05-28  1:42 ` thopre01 at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-28  1:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> ---
Author: danglin
Date: Thu May 28 01:17:52 2015
New Revision: 223794

URL: https://gcc.gnu.org/viewcvs?rev=223794&root=gcc&view=rev
Log:
        PR target/66148
        * config/pa/pa.c (pa_emit_move_sequence): Correct placement of
        REG_EQUAL note when doing insert.


Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/pa/pa.c


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

* [Bug target/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2015-05-28  1:18 ` danglin at gcc dot gnu.org
@ 2015-05-28  1:19 ` danglin at gcc dot gnu.org
  2015-05-28  1:42 ` thopre01 at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2015-05-28  1:19 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> ---
Thanks Thomas for your analysis.


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

* [Bug target/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006
       [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2015-05-28  1:19 ` danglin at gcc dot gnu.org
@ 2015-05-28  1:42 ` thopre01 at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: thopre01 at gcc dot gnu.org @ 2015-05-28  1:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> ---
(In reply to John David Anglin from comment #10)
> Thanks Thomas for your analysis.

You're welcome. I'm glad you fixed the issue so quickly.


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

end of thread, other threads:[~2015-05-28  1:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-66148-4@http.gcc.gnu.org/bugzilla/>
2015-05-17 23:38 ` [Bug middle-end/66148] [6 regression] build/genpreds: Internal error: abort in choose_enum_order, at genpreds.c:1006 danglin at gcc dot gnu.org
2015-05-17 23:42 ` danglin at gcc dot gnu.org
2015-05-18 11:52 ` rguenth at gcc dot gnu.org
2015-05-22 17:12 ` danglin at gcc dot gnu.org
2015-05-25  7:21 ` thopre01 at gcc dot gnu.org
2015-05-25 11:32 ` dave.anglin at bell dot net
2015-05-28  1:10 ` [Bug target/66148] " danglin at gcc dot gnu.org
2015-05-28  1:13 ` danglin at gcc dot gnu.org
2015-05-28  1:16 ` danglin at gcc dot gnu.org
2015-05-28  1:18 ` danglin at gcc dot gnu.org
2015-05-28  1:19 ` danglin at gcc dot gnu.org
2015-05-28  1:42 ` thopre01 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).