From: Richard Biener Date: Wed, 29 Jun 2016 07:52:35 +0000 (+0000) Subject: re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since... X-Git-Tag: basepoints/gcc-8~5972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36d0d9be5585ccc0ea8a44e6d4e93d8d0f7f53a0;p=thirdparty%2Fgcc.git re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since r231674) 2016-06-29 Richard Biener PR rtl-optimization/68961 * simplify-rtx.c (simplify_subreg): Handle VEC_CONCAT like CONCAT. From-SVN: r237840 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e57c1a9b8340..7f6dcb3866bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-06-29 Richard Biener + + PR rtl-optimization/68961 + * simplify-rtx.c (simplify_subreg): Handle VEC_CONCAT like CONCAT. + 2016-06-29 Richard Biener PR middle-end/71002 diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 2203ff703eab..a23a6f51cde6 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -6108,9 +6108,10 @@ simplify_subreg (machine_mode outermode, rtx op, && GET_MODE_SIZE (outermode) <= GET_MODE_SIZE (GET_MODE (op))) return adjust_address_nv (op, outermode, byte); - /* Handle complex values represented as CONCAT - of real and imaginary part. */ - if (GET_CODE (op) == CONCAT) + /* Handle complex or vector values represented as CONCAT or VEC_CONCAT + of two parts. */ + if (GET_CODE (op) == CONCAT + || GET_CODE (op) == VEC_CONCAT) { unsigned int part_size, final_offset; rtx part, res; @@ -6130,10 +6131,13 @@ simplify_subreg (machine_mode outermode, rtx op, if (final_offset + GET_MODE_SIZE (outermode) > part_size) return NULL_RTX; - res = simplify_subreg (outermode, part, GET_MODE (part), final_offset); + enum machine_mode part_mode = GET_MODE (part); + if (part_mode == VOIDmode) + part_mode = GET_MODE_INNER (GET_MODE (op)); + res = simplify_subreg (outermode, part, part_mode, final_offset); if (res) return res; - if (validate_subreg (outermode, GET_MODE (part), part, final_offset)) + if (validate_subreg (outermode, part_mode, part, final_offset)) return gen_rtx_SUBREG (outermode, part, final_offset); return NULL_RTX; }