+2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/87370
+ * config/i386/i386.c (construct_container): Use TImode for
+ BLKmode values in 2 integer registers.
+
2018-09-29 Jeff Law <law@redhat.com>
* builtins.c (unterminated_array): Pass in c_strlen_data * to
if (n == 2
&& regclass[0] == X86_64_INTEGER_CLASS
&& regclass[1] == X86_64_INTEGER_CLASS
- && (mode == CDImode || mode == TImode)
+ && (mode == CDImode || mode == TImode || mode == BLKmode)
&& intreg[0] + 1 == intreg[1])
- return gen_rtx_REG (mode, intreg[0]);
+ {
+ if (mode == BLKmode)
+ {
+ /* Use TImode for BLKmode values in 2 integer registers. */
+ exp[0] = gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_REG (TImode, intreg[0]),
+ GEN_INT (0));
+ ret = gen_rtx_PARALLEL (mode, rtvec_alloc (1));
+ XVECEXP (ret, 0, 0) = exp[0];
+ return ret;
+ }
+ else
+ return gen_rtx_REG (mode, intreg[0]);
+ }
/* Otherwise figure out the entries of the PARALLEL. */
for (i = 0; i < n; i++)
--- /dev/null
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+struct A
+{
+ int b[4];
+};
+struct B
+{
+ char a[12];
+ int b;
+};
+struct C
+{
+ char a[16];
+};
+
+struct A
+f1 (void)
+{
+ struct A x = {};
+ return x;
+}
+
+struct B
+f2 (void)
+{
+ struct B x = {};
+ return x;
+}
+
+struct C
+f3 (void)
+{
+ struct C x = {};
+ return x;
+}
+
+/* { dg-final { scan-assembler-not "xmm" } } */