This is the mail archive of the 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]

Re: vectorization ICE for aarch64/armhf on SPEC2006 h264ref

On Tue, Jan 12, 2016 at 2:22 PM, Jim Wilson <> wrote:
> 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.

To elaborate on this a bit more, I see a number of places that do this
  if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (new_rhs)))
    new_rhs = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, TREE_TYPE (lhs),

In match.pd, there is a rule to convert VIEW_CONVERT_EXPR to NOP_EXPR
  (view_convert @0)
  (if ((INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type))
   (convert @0)))

But according to useless_type_conversion_p, there are two more
conditions that need to be met, the signedness must be the same, and
if one is boolean  and one is not then the precision must be one.  In
my case, we have a 32-bit int type and a 32-bit boolean type.  So
useless_type_conversion_p is demanding a type conversion, but match.pd
is converting the VIEW_CONVERT_EXPR to a NOP_EXPR, and gimplify_build1
is stripping it.  So there appears to be an inconsistency here.


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