re PR target/86314 (GCC 7.x and 8.x zero out "eax" before using "rax" in "lock bts")
authorJakub Jelinek <jakub@redhat.com>
Tue, 26 Jun 2018 11:35:52 +0000 (13:35 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 26 Jun 2018 11:35:52 +0000 (13:35 +0200)
commitd37a91e5c57c518c91de2e570fdbf9d96f90dd41
treec0bd05538b2868f34434c73cfba6ec1b50421d2b
parentf03915116bd2e15713cd20872f224b5ecd0a9b28
re PR target/86314 (GCC 7.x and 8.x zero out "eax" before using "rax" in "lock bts")

PR target/86314
* config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
Check reg_overlap_mentioned_p in addition to reg_set_p with the same
operands.

* gcc.dg/pr86314.c: New test.

From-SVN: r262141
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr86314.c [new file with mode: 0644]