i386: Fix conversion of move to/from AX_REG into xchg [PR106707]
commit5205f5b54ad769969ffd89978ba1bcee41380bf8
authorUros Bizjak <ubizjak@gmail.com>
Thu, 1 Sep 2022 18:20:06 +0000 (1 20:20 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Thu, 1 Sep 2022 18:20:43 +0000 (1 20:20 +0200)
tree0fc3e9ec207c7dd65d2f14c452f0805e16ea4701
parentbb17c5030dc47c69c700e0fd0145285dc8f913a2
i386: Fix conversion of move to/from AX_REG into xchg [PR106707]

The conversion of a move pattern where both operands are AX_REG
should be prevented.

2022-09-01  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

PR target/106707
* config/i386/i386.md (moves to/from AX_REG into xchg peephole2):
Do not convert a move pattern where both operands are AX_REG.

gcc/testsuite/ChangeLog:

PR target/106707
* gcc.target/i386/pr106707.c: New test.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/pr106707.c [new file with mode: 0644]