Fix PR66168

From-SVN: r223795
This commit is contained in:
Thomas Preud'homme 2015-05-28 02:15:03 +00:00 committed by Thomas Preud'homme
parent 225f474784
commit ddd93587ef
4 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2015-05-28 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR rtl-optimization/66168
* loop-invariant.c (move_invariant_reg): Pass dest rather than reg to
can_move_invariant_reg.
2015-05-27 John David Anglin <danglin@gcc.gnu.org>
PR target/66148

View File

@ -1630,7 +1630,7 @@ move_invariant_reg (struct loop *loop, unsigned invno)
if (REG_P (reg))
regno = REGNO (reg);
if (!can_move_invariant_reg (loop, inv, reg))
if (!can_move_invariant_reg (loop, inv, dest))
{
reg = gen_reg_rtx_and_attrs (dest);

View File

@ -1,3 +1,8 @@
2015-05-28 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR rtl-optimization/66168
* gcc.c-torture/compile/pr66168.c: New test.
2015-05-27 Jeff Law <law@redhat.com>
PR target/39726

View File

@ -0,0 +1,15 @@
int a, b;
void
fn1 ()
{
for (;;)
{
for (b = 0; b < 3; b++)
{
char e[2];
char f = e[1];
a ^= f ? 1 / f : 0;
}
}
}