This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/69282] New: aarch64/armhf ICE on SPEC2006 464.h264ref at -O3


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

            Bug ID: 69282
           Summary: aarch64/armhf ICE on SPEC2006 464.h264ref at -O3
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wilson at gcc dot gnu.org
  Target Milestone: ---

Created attachment 37345
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37345&action=edit
aarch64 testcase generated with creduce, ICE at -O3

I'm seeing an ICE compiling SPEC2006 464.h264ref at -O3 on aarch64 and armhf
for the file slice.c.

The problem was created/exposed by the patch for bug 68215.
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68215

The problem occurs in expand_vector_condition.  a_is_comparison is
false.  Before the patch, aa is an ssa_name with type boolean returned
by tree_vec_extract.   This is passed to passed to gimplify_build3
which returns a cond_expr with type int.  After the patch, aa is a
ne_expr with type boolean.  gimplify_build3 calls fold_build3_loc
which optimizes the cond_expr/ne_expr, and returns a nop_expr of type
int of the boolean ne_expr.  gimplify_build3 then calls STRIP_NOPS
which removes the nop_expr, and the end result here is a ne_expr with
a boolean type, which is the wrong type for the constructor.

I don't have a lot of experience with the gimple work, so I'm not sure
where this is going wrong.

I see a number of places in tree-vect-generic.c that add a
VIEW_CONVERT_EXPR if useless_type_convertsion_p is false.  That should
work, except when I try this, I see that the VIEW_CONVERT_EXPR gets
converted to a NOP_EXPR by gimplify_build1, and gets stripped again.

Maybe the gimplify_build* routines should be using
STRIP_USELESS_TYPE_CONVERSION instead of STRIP_NOPS?  That seems to
work, but I don't know if that will have cascading effects.

Or maybe verify_gimple should allow bools and ints to mix in a
constructor?  That doesn't seem like the right solution to me.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]