This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47975] ICE: in expand_shift, at expmed.c:2299 when using 256b vectors without -mavx
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 3 Mar 2011 16:19:31 +0000
- Subject: [Bug target/47975] ICE: in expand_shift, at expmed.c:2299 when using 256b vectors without -mavx
- Auto-submitted: auto-generated
- References: <bug-47975-4@http.gcc.gnu.org/bugzilla/>
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.