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 testsuite/68776] [6 regression] gcc.dg/vect/vect-widen-mult-const-[su]16.c failures since r226675


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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #6)
> On December 17, 2015 4:19:00 PM GMT+01:00, "wschmidt at gcc dot gnu.org"
> <gcc-bugzilla@gcc.gnu.org> wrote:
> >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68776
> >
> >--- Comment #5 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
> >(In reply to Bill Schmidt from comment #4)
> >> Yep.  I'll verify the fix and commit today if all goes well.  Thanks
> >for the
> >> investigation!
> >
> >Actually, looking at check_effective_target_vect_int_mult, this won't
> >work (and
> >I've confirmed it doesn't):
> >
> >  if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
> >             || [istarget spu-*-*]
> >             || [istarget i?86-*-*] || [istarget x86_64-*-*]
> >             || [istarget ia64-*-*]
> >             || [istarget aarch64*-*-*]
> >             || [check_effective_target_arm32] } {
> >           set et_vect_int_mult_saved 1
> >
> >So the proposal will still expect powerpc64le to find 2 instances
> >instead of 4.
> >
> >I've verified that we are generating the expected widening
> >multiplication
> >sequences for foo and bar, and generating 32-bit multiplies for baz.
> 
> But if ppc can do int mult the mult pattern should not apply...

Specifically:

static gimple *
vect_recog_mult_pattern (vec<gimple *> *stmts,
                         tree *type_in, tree *type_out)
{
...
  vectype = get_vectype_for_scalar_type (itype);
  if (vectype == NULL_TREE)
    return NULL;

  /* If the target can handle vectorized multiplication natively,
     don't attempt to optimize this.  */
  optab = optab_for_tree_code (MULT_EXPR, vectype, optab_default);
  if (optab != unknown_optab)
    {
      machine_mode vec_mode = TYPE_MODE (vectype);
      int icode = (int) optab_handler (optab, vec_mode);
      if (icode != CODE_FOR_nothing)
        return NULL;

so powerpc can _not_ do integer multiplication (V2DI in this case).

Ok, so if you take "int" literally it can do vect_int_mult and we don't
have a vect_long_mult target.

I would say it would help to make the "pattern recognized" printing more
specific but that requires some extra work.  Let me try sth simple...

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