http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47975

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-03 
16:19:23 UTC ---
We lower the vector - vector shift to

<bb 2>:
  x.0_1 = x;
  x.1_2 = x;
  D.2689_4 = BIT_FIELD_REF <x.0_1, 128, 0>;
  D.2690_5 = BIT_FIELD_REF <x.1_2, 128, 0>;
  D.2691_6 = D.2689_4 << D.2690_5;
  D.2692_7 = BIT_FIELD_REF <x.0_1, 128, 128>;
  D.2693_8 = BIT_FIELD_REF <x.1_2, 128, 128>;
  D.2694_9 = D.2692_7 << D.2693_8;
  x.2_3 = {D.2691_6, D.2694_9};
  x = x.2_3;
  return;

but do not lower that shift further because type_for_widest_vector_mode
calls optab_handler with ashl_optab which happens because in
optab_for_tree_code
we have

    case LSHIFT_EXPR:
      if (VECTOR_MODE_P (TYPE_MODE (type)))
        {
          if (subtype == optab_vector)
            return TYPE_SATURATING (type) ? NULL : vashl_optab;

          gcc_assert (subtype == optab_scalar);
        }
      if (TYPE_SATURATING(type))
        return TYPE_UNSIGNED(type) ? usashl_optab : ssashl_optab;
      return ashl_optab;

and we have ...

#define TYPE_MODE(NODE) \
  (TREE_CODE (TYPE_CHECK (NODE)) == VECTOR_TYPE \
   ? vector_type_mode (NODE) : (NODE)->type.mode)

which returns BLKmode instead of V8SImode.  Bah to whoever introduced
that hack to TYPE_MODE.

Reply via email to