arm: Fix ICE on glibc compilation after my DIVMOD optimization [PR97322]
authorJakub Jelinek <jakub@redhat.com>
Thu, 8 Oct 2020 09:56:15 +0000 (11:56 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 8 Oct 2020 09:56:15 +0000 (11:56 +0200)
commitf18eeb6b958acd5e1590ca4a73231486b749be9b
treea56f6045df443a81a7ef453af61e6619f02cf133
parent9489806fa258b90b02b55804e61e9eb748724ce7
arm: Fix ICE on glibc compilation after my DIVMOD optimization [PR97322]

The arm target hook for divmod wasn't prepared to handle constants passed to
the function.

2020-10-08  Jakub Jelinek  <jakub@redhat.com>

PR target/97322
* config/arm/arm.c (arm_expand_divmod_libfunc): Pass mode instead of
GET_MODE (op0) or GET_MODE (op1) to emit_library_call_value.

* gcc.dg/pr97322.c: New test.
gcc/config/arm/arm.c
gcc/testsuite/gcc.dg/pr97322.c [new file with mode: 0644]