[Bug rtl-optimization/69161] New: [6 Regression] ICE in simplify_const_unary_operation, at simplify-rtx.c:1633

ktkachov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 6 14:09:00 GMT 2016


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

            Bug ID: 69161
           Summary: [6 Regression] ICE in simplify_const_unary_operation,
                    at simplify-rtx.c:1633
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

Created attachment 37240
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37240&action=edit
testcase

The attached testcases ICEs on aarch64 with -O3 -w:
besttry.c: In function 'func_40':
besttry.c:860:1: internal compiler error: in simplify_const_unary_operation, at
simplify-rtx.c:1633
 }
 ^

0xa872ea simplify_const_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
        $SRC/gcc/simplify-rtx.c:1633
0xa84d8f simplify_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
        $SRC/gcc/simplify-rtx.c:838
0xfa1b2a combine_simplify_rtx
        $SRC/gcc/combine.c:5506
0xfa4317 subst
        $SRC/gcc/combine.c:5456
0xfa41bb subst
        $SRC/gcc/combine.c:5401
0xfa757c try_combine
        $SRC/gcc/combine.c:3264
0xfac385 combine_instructions
        $SRC/gcc/combine.c:1267
0xfac385 rest_of_handle_combine
        $SRC/gcc/combine.c:14311
0xfac385 execute
        $SRC/gcc/combine.c:14354
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.

The assert:
        if (!VECTOR_MODE_P (GET_MODE (op)))
          gcc_assert (GET_MODE_INNER (mode) == GET_MODE (op));

in simplify-rtx.c gets triggered when trying to simplify:
(vec_duplicate:V4SI (eq:CC_NZ (reg:CC_NZ 66 cc)
        (const_int 0 [0])))

I think we shouldn't be asserting here but rather returning zero to indicate
that no simplification is possible.

I think this bug is latent on previous releases, but this testcases ICEs only
on trunk


More information about the Gcc-bugs mailing list