TImode register referenced in debug insn can be converted to V1TImode by
scalar to vector optimization. When converting a TImode store to V1TImode,
we need to check all debug insns on its use chain to convert the V1TImode
register to SUBREG TImode if source register is undefined.
gcc/
PR target/72748
* config/i386/i386.c (timode_scalar_chain::convert_insn): Call
fix_debug_reg_uses after changing source register mode to
V1TImode if source register is undefined.
gcc/testsuite/
PR target/72748
* gcc.target/i386/pr72748.c: New test.
From-SVN: r238956
+2015-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/72748
+ * config/i386/i386.c (timode_scalar_chain::convert_insn): Call
+ fix_debug_reg_uses after changing source register mode to
+ V1TImode if source register is undefined.
+
2015-08-01 Alan Hayward <alan.hayward@arm.com>
PR tree-optimization/71818
switch (GET_CODE (src))
{
case REG:
+ PUT_MODE (src, V1TImode);
+ /* Call fix_debug_reg_uses only if SRC is never defined. */
+ if (!DF_REG_DEF_CHAIN (REGNO (src)))
+ fix_debug_reg_uses (src);
+ break;
+
case MEM:
PUT_MODE (src, V1TImode);
break;
+2015-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/72748
+ * gcc.target/i386/pr72748.c: New test.
+
2015-08-01 Alan Hayward <alan.hayward@arm.com>
PR tree-optimization/71818
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+volatile int a;
+int c, d, e, f, g, h;
+
+int fn1 ()
+{
+ int i;
+ for (; d;)
+ {
+ if (e)
+ break;
+ g = 0;
+ int j[4];
+ for (h = 0; h < 4; h++)
+ g++;
+ for (; c < 2; c++)
+ {
+ e = j[g];
+ i = j[0];
+ f = 4;
+ }
+ f |= d;
+ }
+ return a;
+}