aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-06-29 07:52:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-06-29 07:52:35 +0000
commit36d0d9be5585ccc0ea8a44e6d4e93d8d0f7f53a0 (patch)
treef7fb8843971544489a0782780ca909307692ccd7 /gcc
parent4aa83879c93d2367f5245c94bd2f12c19f486dae (diff)
downloadgcc-36d0d9be5585ccc0ea8a44e6d4e93d8d0f7f53a0.zip
gcc-36d0d9be5585ccc0ea8a44e6d4e93d8d0f7f53a0.tar.gz
gcc-36d0d9be5585ccc0ea8a44e6d4e93d8d0f7f53a0.tar.bz2
re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since r231674)
2016-06-29 Richard Biener <rguenther@suse.de> PR rtl-optimization/68961 * simplify-rtx.c (simplify_subreg): Handle VEC_CONCAT like CONCAT. From-SVN: r237840
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e57c1a9..7f6dcb3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2016-06-29 Richard Biener <rguenther@suse.de>
+ PR rtl-optimization/68961
+ * simplify-rtx.c (simplify_subreg): Handle VEC_CONCAT like CONCAT.
+
+2016-06-29 Richard Biener <rguenther@suse.de>
+
PR middle-end/71002
* alias.c (component_uses_parent_alias_set_from): Handle
type punning through union accesses by using the union alias set.
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 2203ff7..a23a6f5 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;
}