+2016-07-26 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/71984
+ * simplify-rtx.c (simplify_subreg): Use GET_MODE_SIZE and prepare
+ for VOIDmode.
+
2016-07-26 Richard Biener <rguenther@suse.de>
PR middle-end/72517
unsigned int part_size, final_offset;
rtx part, res;
- part_size = GET_MODE_UNIT_SIZE (GET_MODE (XEXP (op, 0)));
+ enum machine_mode part_mode = GET_MODE (XEXP (op, 0));
+ if (part_mode == VOIDmode)
+ part_mode = GET_MODE_INNER (GET_MODE (op));
+ part_size = GET_MODE_SIZE (part_mode);
if (byte < part_size)
{
part = XEXP (op, 0);
if (final_offset + GET_MODE_SIZE (outermode) > part_size)
return NULL_RTX;
- enum machine_mode part_mode = GET_MODE (part);
+ 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);
+2016-07-26 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/71984
+ * gcc.dg/torture/pr71984.c: New testcase.
+
2016-07-26 Robert Suchanek <robert.suchanek@imgtec.com>
* g++.dg/vect/vect.exp: Add and set new global EFFECTIVE_TARGETS. Call
--- /dev/null
+/* { dg-do run { target lp64 } } */
+/* { dg-additional-options "-w -Wno-psabi" } */
+
+typedef unsigned char v64u8 __attribute__((vector_size(64)));
+typedef unsigned long v64u64 __attribute__((vector_size(64)));
+typedef unsigned char u8;
+
+static u8 __attribute__ ((noinline, noclone))
+foo (v64u64 v64u64_0)
+{
+ return ((v64u8)(v64u64){0, v64u64_0[0]})[13];
+}
+
+int
+main ()
+{
+ u8 x = foo((v64u64){0x0706050403020100UL});
+ if (x != 5)
+ __builtin_abort ();
+ return 0;
+}