i386: Force inputs to a register to avoid lowpart_subreg failure [PR104458]
commit2b399dbabd48639ab4daac462c9d82c6cf3f99cc
authorUros Bizjak <ubizjak@gmail.com>
Wed, 9 Feb 2022 19:18:10 +0000 (9 20:18 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 9 Feb 2022 19:18:48 +0000 (9 20:18 +0100)
tree2476fa0b56128e0a0771ffd89e6739820f4b4526
parenteefec38c992e3622a69de9667e91f0cafbff03cc
i386: Force inputs to a register to avoid lowpart_subreg failure [PR104458]

Input operands can be in the form of:

(subreg:DI (reg:V2SF 96) 0)

which chokes lowpart_subreg. Force inputs to a register, which is
preferable even when the input operand is from memory.

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

gcc/ChangeLog:

PR target/104458
* config/i386/i386-expand.cc (ix86_split_idivmod):
Force operands[2] and operands[3] into a register..

gcc/testsuite/ChangeLog:

PR target/104458
* gcc.target/i386/pr104458.c: New test.
gcc/config/i386/i386-expand.cc
gcc/testsuite/gcc.target/i386/pr104458.c [new file with mode: 0644]