optabs.c (expand_vector_binop): Don't store using a SUBREG smaller than UNITS_PER_WORD...
authorJ"orn Rennecke <joern.rennecke@superh.com>
Wed, 3 Jul 2002 09:49:46 +0000 (09:49 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 3 Jul 2002 09:49:46 +0000 (10:49 +0100)
commit34a80643d8c74d96786fa19eec8a39fc94ac10b4
tree4e697d4885e1475c42eeedf76c38e9b4ccdff584
parent032b2b29901082316175de7c7edb51c927ab06aa
optabs.c (expand_vector_binop): Don't store using a SUBREG smaller than UNITS_PER_WORD...

gcc:
* optabs.c (expand_vector_binop): Don't store using a SUBREG smaller
than UNITS_PER_WORD, unless this is little endian and the first unit
in this word.  Let extract_bit_field decide how to load an element.
Force arguments to matching mode.
(expand_vector_unop): Likewise.

* simplify-rtx.c (simplify_subreg): Don't assume that all vectors
consist of word_mode elements.
* c-typeck.c (build_binary_op): Allow vector types for BIT_AND_EXPR,
BIT_ANDTC_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
(build_unary_op): Allow vector types for BIT_NOT_EPR.
* emit-rtl.c (gen_lowpart_common): Use simplify_gen_subreg for
CONST_VECTOR.
* optabs.c (expand_vector_binop): Try to perform operation in
smaller vector modes with same inner size.  Add handling of AND, IOR
and XOR.  Reject expansion to inner-mode sized scalars when using
OPTAB_DIRECT.  Use simplify_gen_subreg on constants.
(expand_vector_unop): Try to perform operation in smaller vector
modes with same inner size.  Add handling of one's complement.
When there is no vector negate operation, try a vector subtract
operation.  Use simplify_gen_subreg on constants.
* simplify-rtx.c (simplify_subreg): Add capability to convert vector
constants into smaller vectors with same inner mode, and to
integer CONST_DOUBLEs.

gcc/testsuite:
* gcc.c-torture/execute/simd-1.c (main): Also test &, |, ^, ~.
* gcc.c-torture/execute/simd-2.c (main): Likewise.

From-SVN: r55209
gcc/ChangeLog
gcc/c-typeck.c
gcc/emit-rtl.c
gcc/optabs.c
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/simd-1.c
gcc/testsuite/gcc.c-torture/execute/simd-2.c