public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/58383] New: ICE when RTL folds vector operations using constants after gne_int_mode changes
@ 2013-09-10 13:05 jgreenhalgh at gcc dot gnu.org
  2013-09-10 13:15 ` [Bug rtl-optimization/58383] " jgreenhalgh at gcc dot gnu.org
  2014-05-07  9:05 ` [Bug rtl-optimization/58383] ICE when RTL folds vector operations using constants after gen_int_mode changes jgreenhalgh at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2013-09-10 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58383
           Summary: ICE when RTL folds vector operations using constants
                    after gne_int_mode changes
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jgreenhalgh at gcc dot gnu.org

The patch set around [1/4] Using gen_int_mode instead of GEN_INT causes a
number of similair regressions when building for AArch64.

To pick one example, when building gcc.target/aarch64/vect-fcm-eq-d.c we can
get in to the situation where simplify_unary_expression_1 is trying to simplify
(V2DI: NOT (NEG X)) and will thus try to generate (V2DI: PLUS (X - 1)).

Now we will call plus_constant, and from there gen_int_mode (-1, v2di). From
here we call trunc_int_for_mode (-1, v2di) and trigger the assert:

   /* You want to truncate to a _what_?  */
   gcc_assert (SCALAR_INT_MODE_P (mode));

The failures eventually look like:

In file included from
../src/gcc/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c:9:0:
../src/gcc/gcc/testsuite/gcc.target/aarch64/vect-fcm.x: In function 'foo':
../src/gcc/gcc/testsuite/gcc.target/aarch64/vect-fcm.x:25:1: internal compiler
error: in trunc_int_for_mode, at explow.c:55
 }
 ^
0x6abc8e trunc_int_for_mode(long, machine_mode)
    /work/gcc-dev/src/gcc/gcc/explow.c:55
0x69bb28 gen_int_mode(long, machine_mode)
    /work/gcc-dev/src/gcc/gcc/emit-rtl.c:420
0x6abcf2 plus_constant
    /work/gcc-dev/src/gcc/gcc/explow.c:189
0x6abcf2 plus_constant
    /work/gcc-dev/src/gcc/gcc/explow.c:79
0x8f107f simplify_gen_unary(rtx_code, machine_mode, rtx_def*, machine_mode)
    /work/gcc-dev/src/gcc/gcc/simplify-rtx.c:369
0xc55e09 propagate_rtx_1
    /work/gcc-dev/src/gcc/gcc/fwprop.c:490
0xc55e6f propagate_rtx_1
    /work/gcc-dev/src/gcc/gcc/fwprop.c:497
0xc55e86 propagate_rtx_1
    /work/gcc-dev/src/gcc/gcc/fwprop.c:498
0xc56409 propagate_rtx
    /work/gcc-dev/src/gcc/gcc/fwprop.c:675
0xc57dff forward_propagate_and_simplify
    /work/gcc-dev/src/gcc/gcc/fwprop.c:1337
0xc57dff forward_propagate_into
    /work/gcc-dev/src/gcc/gcc/fwprop.c:1394
0xc58593 forward_propagate_into
    /work/gcc-dev/src/gcc/gcc/fwprop.c:1359
0xc58593 fwprop
    /work/gcc-dev/src/gcc/gcc/fwprop.c:1479
0xc58593 execute
    /work/gcc-dev/src/gcc/gcc/fwprop.c:1515
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.


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

* [Bug rtl-optimization/58383] ICE when RTL folds vector operations using constants after gne_int_mode changes
  2013-09-10 13:05 [Bug rtl-optimization/58383] New: ICE when RTL folds vector operations using constants after gne_int_mode changes jgreenhalgh at gcc dot gnu.org
@ 2013-09-10 13:15 ` jgreenhalgh at gcc dot gnu.org
  2014-05-07  9:05 ` [Bug rtl-optimization/58383] ICE when RTL folds vector operations using constants after gen_int_mode changes jgreenhalgh at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2013-09-10 13:15 UTC (permalink / raw)
  To: gcc-bugs

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

jgreenhalgh at gcc dot gnu.org changed:

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

--- Comment #1 from jgreenhalgh at gcc dot gnu.org ---
Created attachment 30788
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30788&action=edit
Proposed fix

A patch along these lines works for me, covering the case where gen_int_mode is
called to generate a vector integer.


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

* [Bug rtl-optimization/58383] ICE when RTL folds vector operations using constants after gen_int_mode changes
  2013-09-10 13:05 [Bug rtl-optimization/58383] New: ICE when RTL folds vector operations using constants after gne_int_mode changes jgreenhalgh at gcc dot gnu.org
  2013-09-10 13:15 ` [Bug rtl-optimization/58383] " jgreenhalgh at gcc dot gnu.org
@ 2014-05-07  9:05 ` jgreenhalgh at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2014-05-07  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

jgreenhalgh at gcc dot gnu.org changed:

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

--- Comment #2 from jgreenhalgh at gcc dot gnu.org ---
I can't see this on current trunk or 4.9, and I can't remember the context for
the bug. Closing as invalid.


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

end of thread, other threads:[~2014-05-07  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 13:05 [Bug rtl-optimization/58383] New: ICE when RTL folds vector operations using constants after gne_int_mode changes jgreenhalgh at gcc dot gnu.org
2013-09-10 13:15 ` [Bug rtl-optimization/58383] " jgreenhalgh at gcc dot gnu.org
2014-05-07  9:05 ` [Bug rtl-optimization/58383] ICE when RTL folds vector operations using constants after gen_int_mode changes jgreenhalgh 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).