From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26757 invoked by alias); 10 Sep 2013 13:05:26 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26671 invoked by uid 48); 10 Sep 2013 13:05:22 -0000 From: "jgreenhalgh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/58383] New: ICE when RTL folds vector operations using constants after gne_int_mode changes Date: Tue, 10 Sep 2013 13:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jgreenhalgh 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 bug_severity priority component assigned_to reporter Message-ID: 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-09/txt/msg00710.txt.bz2 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 for instructions.