From 686cc9441ba3d565987823934e6c33eb2337da3b Mon Sep 17 00:00:00 2001 From: uros Date: Wed, 22 Jul 2009 13:04:19 +0000 Subject: [PATCH] * config/i386/predicates.md (zero_extended_scalar_load_operand): Use CONST_VECTOR_NUNITS to determine number of elements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149930 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 +++++++- gcc/config/i386/predicates.md | 11 +++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e939cd..bfafc2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-07-22 Uros Bizjak + + * config/i386/predicates.md (zero_extended_scalar_load_operand): + Use CONST_VECTOR_NUNITS to determine number of elements. + 2009-07-22 Andreas Krebbel * config/s390/constraints.md (ZQ, ZR, ZS, ZT): New constraints. @@ -110,7 +115,8 @@ combined_args_to_skip and args_to_skip. * tree-inline.c (update_clone_info): New function. (tree_function_versioning): Call update_clone_info. - * cgraphunit.c: (cgraph_materialize_clone): Dump materialized functions. + * cgraphunit.c: (cgraph_materialize_clone): Dump materialized + functions. (cgraph_materialize_all_clones): More extensive dumping, working with combined_args_to_skip rather than args_to_skip. diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 196599b..2a4b61d 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -750,13 +750,12 @@ { unsigned n_elts; op = maybe_get_pool_constant (op); - if (!op) - return 0; - if (GET_CODE (op) != CONST_VECTOR) + + if (!(op && GET_CODE (op) == CONST_VECTOR)) return 0; - n_elts = - (GET_MODE_SIZE (GET_MODE (op)) / - GET_MODE_SIZE (GET_MODE_INNER (GET_MODE (op)))); + + n_elts = CONST_VECTOR_NUNITS (op); + for (n_elts--; n_elts > 0; n_elts--) { rtx elt = CONST_VECTOR_ELT (op, n_elts); -- 2.7.4