https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96558
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu.org
Ever confirmed|0 |1
Target Milestone|--- |11.0
Last reconfirmed| |2020-08-11
Status|UNCONFIRMED |NEW
--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Confirmed, introduced by g:c072fd236dc08f990bfcffd98b27f211a39bb404 that adds
too broad peephole2 match.
Should be fixed by:
--cut here--
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 4e916bf3c32..8836552bc17 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -18938,7 +18938,7 @@
;; i.e. prefer "xorl %eax,%eax; test/cmp" over "test/cmp; movl $0, %eax".
(define_peephole2
[(set (reg FLAGS_REG) (match_operand 0))
- (set (match_operand:SWI 1 "register_operand") (const_int 0))]
+ (set (match_operand:SWI 1 "general_reg_operand") (const_int 0))]
"peep2_regno_dead_p (0, FLAGS_REG)
&& !reg_overlap_mentioned_p (operands[1], operands[0])"
[(set (match_dup 2) (match_dup 0))]
--cut here--