diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-04 06:38:56 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-04 06:38:56 +0000 |
commit | 4867a033a5aa737fe0c6f420949e8adf952e56a8 (patch) | |
tree | 5cdb83b9d2d84c7ed93535b98565144e433e4ec7 /gcc/convert.c | |
parent | 6a59b91ab7ddd7625388a61169ff626f6bc35664 (diff) | |
download | gcc-4867a033a5aa737fe0c6f420949e8adf952e56a8.tar.gz |
gcc:
* simplify-rtx.c (simplify_subreg): Reduce problem of finding
vector mode subregs of constants to finding integer mode
subregs of constants.
* cse.c (cse_insn): Use simplify_gen_subreg.
* convert.c (convert_to_integer): Don't strip a NOP_EXPR
From a vector mode expression of different size than the
target mode.
gcc/testsuite:
* gcc.c-torture/compile/simd-3.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55234 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r-- | gcc/convert.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index e90ce4c88d6..e440e35f575 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -376,6 +376,12 @@ convert_to_integer (type, expr) } case NOP_EXPR: + /* Don't introduce a + "can't convert between vector values of different size" error. */ + if (TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == VECTOR_TYPE + && (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_OPERAND (expr, 0)))) + != GET_MODE_SIZE (TYPE_MODE (type)))) + break; /* If truncating after truncating, might as well do all at once. If truncating after extending, we may get rid of wasted work. */ return convert (type, get_unwidened (TREE_OPERAND (expr, 0), type)); |