From 05d41b0cb1947efb306b645095724624c21fcdc1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 18 Sep 2017 19:06:00 +0000 Subject: [PATCH] re PR target/81613 (FAIL: gfortran.dg/intrinsic_modulo_1.f90 -O3 -g execution test) PR target/81613 * config/m68k/m68k.md (moveq feeding equality comparison): Check that the registers are different. From-SVN: r252949 --- gcc/ChangeLog | 6 ++++++ gcc/config/m68k/m68k.md | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32a286241f6..2267d2e940b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-09-18 Andreas Schwab + + PR target/81613 + * config/m68k/m68k.md (moveq feeding equality comparison): Check + that the registers are different. + 2017-09-18 Uros Bizjak * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 7933f8eb253..827dc809342 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -7728,7 +7728,8 @@ "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)]) -- 2.30.2