re PR target/81613 (FAIL: gfortran.dg/intrinsic_modulo_1.f90 -O3 -g execution...
authorAndreas Schwab <schwab@linux-m68k.org>
Mon, 18 Sep 2017 19:06:00 +0000 (19:06 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Mon, 18 Sep 2017 19:06:00 +0000 (19:06 +0000)
PR target/81613
* config/m68k/m68k.md (moveq feeding equality comparison): Check
that the registers are different.

From-SVN: r252949

gcc/ChangeLog
gcc/config/m68k/m68k.md

index 32a286241f6a27a1243c080d93ad62bef2ccdbd0..2267d2e940be0fe63f7a3d2d594ea3c15dbc673f 100644 (file)
@@ -1,3 +1,9 @@
+2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
+
+       PR target/81613
+       * config/m68k/m68k.md (moveq feeding equality comparison): Check
+       that the registers are different.
+
 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
index 7933f8eb253270ef835167e4668be2d8ea47810e..827dc809342d6249ef7a987e9b9e6fe7a846f56f 100644 (file)
   "peep2_reg_dead_p (2, operands[0])
    && peep2_reg_dead_p (2, operands[2])
    && (operands[3] == pc_rtx || operands[4] == pc_rtx)
-   && DATA_REG_P (operands[2])"
+   && DATA_REG_P (operands[2])
+   && !rtx_equal_p (operands[0], operands[2])"
   [(set (match_dup 2) (plus:SI (match_dup 2) (match_dup 6)))
    (set (cc0) (compare (match_dup 2) (const_int 0)))
    (set (pc) (if_then_else (match_op_dup 5 [(cc0) (const_int 0)])