Complete change to resolve pr90275.
authorJeff Law <law@redhat.com>
Wed, 18 Mar 2020 22:07:28 +0000 (16:07 -0600)
committerJeff Law <law@redhat.com>
Wed, 18 Mar 2020 22:07:28 +0000 (16:07 -0600)
PR rtl-optimization/90275
* cse.c (cse_insn): Delete no-op register moves too.

gcc/ChangeLog
gcc/cse.c

index 8694f272a9cc822d5f46177378a7d125372b6f74..3a2e491113e72408bfc98ef05ea3b8a6cb402b31 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-12  Richard Sandiford  <richard.sandiford@arm.com>
+
+       PR rtl-optimization/90275
+       * cse.c (cse_insn): Delete no-op register moves too.
+
 2020-03-18  Martin Sebor  <msebor@redhat.com>
 
        PR ipa/92799
index 08984c170403e00929785ee067d6668d52731721..3e8724b3fedb0f1ce9326952e31b3a7b5f6e7030 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5329,7 +5329,6 @@ cse_insn (rtx_insn *insn)
          else if (n_sets == 1
                   && !CALL_P (insn)
                   && (MEM_P (trial) || REG_P (trial))
-                  && MEM_P (dest)
                   && rtx_equal_p (trial, dest)
                   && !side_effects_p (dest)
                   && (cfun->can_delete_dead_exceptions