Commit 8750672f by Richard Guenther Committed by Richard Biener

re PR target/47975 (ICE: in expand_shift, at expmed.c:2299 when using 256b vectors without -mavx)

2011-03-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/47975
	* optabs.c (optab_for_tree_code): Do not use VECTOR_MODE_P.

	* gcc.dg/torture/pr47975.c: New testcase.

From-SVN: r170672
parent d1ad70b2
2011-03-04 Richard Guenther <rguenther@suse.de>
PR middle-end/47975
* optabs.c (optab_for_tree_code): Do not use VECTOR_MODE_P.
2011-03-04 Richard Henderson <rth@redhat.com> 2011-03-04 Richard Henderson <rth@redhat.com>
* explow.c (emit_stack_save): Remove 'after' parameter. * explow.c (emit_stack_save): Remove 'after' parameter.
......
...@@ -303,7 +303,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, ...@@ -303,7 +303,7 @@ optab_for_tree_code (enum tree_code code, const_tree type,
return TYPE_UNSIGNED (type) ? udiv_optab : sdiv_optab; return TYPE_UNSIGNED (type) ? udiv_optab : sdiv_optab;
case LSHIFT_EXPR: case LSHIFT_EXPR:
if (VECTOR_MODE_P (TYPE_MODE (type))) if (TREE_CODE (type) == VECTOR_TYPE)
{ {
if (subtype == optab_vector) if (subtype == optab_vector)
return TYPE_SATURATING (type) ? NULL : vashl_optab; return TYPE_SATURATING (type) ? NULL : vashl_optab;
...@@ -315,7 +315,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, ...@@ -315,7 +315,7 @@ optab_for_tree_code (enum tree_code code, const_tree type,
return ashl_optab; return ashl_optab;
case RSHIFT_EXPR: case RSHIFT_EXPR:
if (VECTOR_MODE_P (TYPE_MODE (type))) if (TREE_CODE (type) == VECTOR_TYPE)
{ {
if (subtype == optab_vector) if (subtype == optab_vector)
return TYPE_UNSIGNED (type) ? vlshr_optab : vashr_optab; return TYPE_UNSIGNED (type) ? vlshr_optab : vashr_optab;
...@@ -325,7 +325,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, ...@@ -325,7 +325,7 @@ optab_for_tree_code (enum tree_code code, const_tree type,
return TYPE_UNSIGNED (type) ? lshr_optab : ashr_optab; return TYPE_UNSIGNED (type) ? lshr_optab : ashr_optab;
case LROTATE_EXPR: case LROTATE_EXPR:
if (VECTOR_MODE_P (TYPE_MODE (type))) if (TREE_CODE (type) == VECTOR_TYPE)
{ {
if (subtype == optab_vector) if (subtype == optab_vector)
return vrotl_optab; return vrotl_optab;
...@@ -335,7 +335,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, ...@@ -335,7 +335,7 @@ optab_for_tree_code (enum tree_code code, const_tree type,
return rotl_optab; return rotl_optab;
case RROTATE_EXPR: case RROTATE_EXPR:
if (VECTOR_MODE_P (TYPE_MODE (type))) if (TREE_CODE (type) == VECTOR_TYPE)
{ {
if (subtype == optab_vector) if (subtype == optab_vector)
return vrotr_optab; return vrotr_optab;
......
2011-03-04 Richard Guenther <rguenther@suse.de>
PR middle-end/47975
* gcc.dg/torture/pr47975.c: New testcase.
2011-03-03 Paolo Carlini <paolo.carlini@oracle.com> 2011-03-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47974 PR c++/47974
......
/* { dg-do compile } */
int __attribute__ ((vector_size (32))) x;
void
foo (void)
{
x <<= x;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment