diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-07-21 08:57:07 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-07-21 08:57:07 +0000 |
commit | 3a021db2999ccd790948dc36c876f39601922884 (patch) | |
tree | 04000c5f2ebc9c61790505ccc698906864ba8de9 /gcc/fold-const.c | |
parent | 4b997cc8bb5bc3c83b9bf3e7866e0f4627f4b708 (diff) | |
download | gcc-3a021db2999ccd790948dc36c876f39601922884.zip gcc-3a021db2999ccd790948dc36c876f39601922884.tar.gz gcc-3a021db2999ccd790948dc36c876f39601922884.tar.bz2 |
c-common.c (vector_types_convertible_p): Use vector types' TYPE_SIZE and TREE_TYPE instead of their mode.
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (vector_types_convertible_p): Use vector types'
TYPE_SIZE and TREE_TYPE instead of their mode.
* convert.c (convert_to_integer): Likewise.
(convert_to_vector): Likewise.
* fold-const.c (fold_convert): Likewise.
* varasm.c (output_constant): Likewise.
* expr.c (store_constructor): Split ARRAY_TYPE and VECTOR_TYPE.
Allow a VECTOR_TYPE initializer to be made of several vectors.
For ARRAY_TYPEs and VECTOR_TYPES, simplify a bit the handling
of cleared and need_to_clear, and use fold_convert.
* c-typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
cp/ChangeLog:
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* c-typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
From-SVN: r85002
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 946a2fb..e976117 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1931,8 +1931,7 @@ fold_convert (tree type, tree arg) return fold_convert (type, tem); } if (TREE_CODE (orig) == VECTOR_TYPE - && GET_MODE_SIZE (TYPE_MODE (type)) - == GET_MODE_SIZE (TYPE_MODE (orig))) + && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig))) return fold (build1 (NOP_EXPR, type, arg)); } else if (TREE_CODE (type) == REAL_TYPE) @@ -1991,12 +1990,10 @@ fold_convert (tree type, tree arg) else if (TREE_CODE (type) == VECTOR_TYPE) { if ((INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig)) - && GET_MODE_SIZE (TYPE_MODE (type)) - == GET_MODE_SIZE (TYPE_MODE (orig))) + && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig))) return fold (build1 (NOP_EXPR, type, arg)); if (TREE_CODE (orig) == VECTOR_TYPE - && GET_MODE_SIZE (TYPE_MODE (type)) - == GET_MODE_SIZE (TYPE_MODE (orig))) + && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig))) return fold (build1 (NOP_EXPR, type, arg)); } else if (VOID_TYPE_P (type)) |