diff options
author | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2015-05-28 02:15:03 +0000 |
---|---|---|
committer | Thomas Preud'homme <thopre01@gcc.gnu.org> | 2015-05-28 02:15:03 +0000 |
commit | ddd93587efdd85681c3512bbfaa1988ea449d7dc (patch) | |
tree | 1d2dcb0c692fc8dbbe8ba5df2be6f41958881094 | |
parent | 225f474784fabd1d083c6850a61ad266117b3e81 (diff) | |
download | gcc-ddd93587efdd85681c3512bbfaa1988ea449d7dc.zip gcc-ddd93587efdd85681c3512bbfaa1988ea449d7dc.tar.gz gcc-ddd93587efdd85681c3512bbfaa1988ea449d7dc.tar.bz2 |
Fix PR66168
From-SVN: r223795
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/loop-invariant.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr66168.c | 15 |
4 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a4571f6..74be3c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 85270fe..c432129 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a1a242e..84b9fab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr66168.c b/gcc/testsuite/gcc.c-torture/compile/pr66168.c new file mode 100644 index 0000000..d6bfc7b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr66168.c @@ -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; + } + } +} |