From 36d0d9be5585ccc0ea8a44e6d4e93d8d0f7f53a0 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 29 Jun 2016 07:52:35 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/simplify-rtx.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e57c1a9b834..7f6dcb3866b 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 2203ff703ea..a23a6f51cde 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; } -- 2.30.2