re PR target/82361 (Useless "mov eax, eax" in generated code)
authorJakub Jelinek <jakub@redhat.com>
Sat, 30 Sep 2017 08:10:15 +0000 (10:10 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 30 Sep 2017 08:10:15 +0000 (10:10 +0200)
commit15c77315001af0842a537ff748d1a0995ad38545
tree88422c20d5913d279b89b716af89576b2fe24a3b
parent6bc1d858fbeba5ed7ee06266a3d6738bad2d8b3f
re PR target/82361 (Useless "mov eax, eax" in generated code)

PR target/82361
* config/i386/i386.md
(TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
(divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
*divmodsi4_zext_2): New define_insn_and_split.
(*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
(TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
(udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
*udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
New define_insn_and_split.
(*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
* config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
operands[1] having DImode when mode is SImode.

* gcc.target/i386/pr82361-1.c: New test.
* gcc.target/i386/pr82361-2.c: New test.

From-SVN: r253317
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr82361-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr82361-2.c [new file with mode: 0644]