From 4867a033a5aa737fe0c6f420949e8adf952e56a8 Mon Sep 17 00:00:00 2001 From: amylaar Date: Thu, 4 Jul 2002 06:38:56 +0000 Subject: 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 --- gcc/convert.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/convert.c') 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)); -- cgit v1.2.1