diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/optabs.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr47975.c | 9 |
4 files changed, 23 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3086fe0..a968fe7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * explow.c (emit_stack_save): Remove 'after' parameter. diff --git a/gcc/optabs.c b/gcc/optabs.c index 26735dd..6be8db0 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -303,7 +303,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, return TYPE_UNSIGNED (type) ? udiv_optab : sdiv_optab; case LSHIFT_EXPR: - if (VECTOR_MODE_P (TYPE_MODE (type))) + if (TREE_CODE (type) == VECTOR_TYPE) { if (subtype == optab_vector) return TYPE_SATURATING (type) ? NULL : vashl_optab; @@ -315,7 +315,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, return ashl_optab; case RSHIFT_EXPR: - if (VECTOR_MODE_P (TYPE_MODE (type))) + if (TREE_CODE (type) == VECTOR_TYPE) { if (subtype == optab_vector) return TYPE_UNSIGNED (type) ? vlshr_optab : vashr_optab; @@ -325,7 +325,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, return TYPE_UNSIGNED (type) ? lshr_optab : ashr_optab; case LROTATE_EXPR: - if (VECTOR_MODE_P (TYPE_MODE (type))) + if (TREE_CODE (type) == VECTOR_TYPE) { if (subtype == optab_vector) return vrotl_optab; @@ -335,7 +335,7 @@ optab_for_tree_code (enum tree_code code, const_tree type, return rotl_optab; case RROTATE_EXPR: - if (VECTOR_MODE_P (TYPE_MODE (type))) + if (TREE_CODE (type) == VECTOR_TYPE) { if (subtype == optab_vector) return vrotr_optab; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 69b7569..c105422 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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> PR c++/47974 diff --git a/gcc/testsuite/gcc.dg/torture/pr47975.c b/gcc/testsuite/gcc.dg/torture/pr47975.c new file mode 100644 index 0000000..2919452 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr47975.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ + +int __attribute__ ((vector_size (32))) x; + +void +foo (void) +{ + x <<= x; +} |