PR target/80019
* config/i386/i386.c (ix86_vector_duplicate_value): Create
subreg of inner mode for values already in registers.
testsuite/ChangeLog:
PR target/80019
* gcc.target/i386/pr80019.c: New test.
From-SVN: r246161
+2017-03-15 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/80019
+ * config/i386/i386.c (ix86_vector_duplicate_value): Create
+ subreg of inner mode for values already in registers.
+
2017-03-15 Bernd Schmidt <bschmidt@redhat.com>
* config/c6x/c6x.c (hwloop_optimize): Handle case where the old
if (recog_memoized (insn) < 0)
{
rtx_insn *seq;
+ machine_mode innermode = GET_MODE_INNER (mode);
+ rtx reg;
+
/* If that fails, force VAL into a register. */
start_sequence ();
- XEXP (dup, 0) = force_reg (GET_MODE_INNER (mode), val);
+ reg = force_reg (innermode, val);
+ if (GET_MODE (reg) != innermode)
+ reg = gen_lowpart (innermode, reg);
+ XEXP (dup, 0) = reg;
seq = get_insns ();
end_sequence ();
if (seq)
+2017-03-15 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/80019
+ * gcc.target/i386/pr80019.c: New test.
+
2017-03-15 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-prof/pr66295.c: Removed unused dg-error.
--- /dev/null
+/* PR target/80019 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mxop -mavx2" } */
+
+typedef char v16qi __attribute__ ((vector_size (16)));
+
+extern v16qi b, c;
+
+void
+foo (int e)
+{
+ b = c << e;
+}