Convert V1TImode register to TImode in debug insn
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
This commit is contained in:
parent
2a93954eab
commit
37bce35a7e
4 changed files with 45 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -3858,6 +3858,12 @@ timode_scalar_chain::convert_insn (rtx_insn *insn)
|
|||
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;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
27
gcc/testsuite/gcc.target/i386/pr72748.c
Normal file
27
gcc/testsuite/gcc.target/i386/pr72748.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* { 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue