aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-12-01 16:25:06 +0100
committerJakub Jelinek <jakub@redhat.com>2020-12-01 16:25:06 +0100
commit855bb43f6d0bee5a74b5d3739456ca34b4609a50 (patch)
tree8839e8e947d1c3ff16361bafe25a84050e414c53 /Makefile.in
parent404d0ca7820bbf258e2edfac423403ee31b48a7b (diff)
downloadgcc-855bb43f6d0bee5a74b5d3739456ca34b4609a50.zip
gcc-855bb43f6d0bee5a74b5d3739456ca34b4609a50.tar.gz
gcc-855bb43f6d0bee5a74b5d3739456ca34b4609a50.tar.bz2
Improve double-word mod even on powerpc [PR97459]
I have noticed that while my (already committed, thanks for review) patch works on x86, it doesn't work on powerpc*. The problem is that we don't have lshr double-word optab (neither TImode nor for -m32 DImode), but as expander has code for double-word shift, that doesn't really matter. As the implementation is prepared to punt whenever something can't be expanded with OPTAB_DIRECT and in the end also punts if any library calls would be emitted, the optab_handler checks were just to save compile time. On the other side, for even divisors, we know that (1 << bit) % (2 * x) for bit > 0 will never be equal to 1, because both dividend and divisor are even and so remainder will be even too, so we can save some compile time by adding an early exit. The even divisors can be handled with the approach Thomas wrote about (perhaps generalized into divisors equal to what expand_doubleword_mod can handle times some power of two where we can handle power of two modulo cheaply), but that would be done in a different function... And we could use ctz to find the power of two... 2020-12-01 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/97459 * optabs.c (expand_doubleword_mod): Punt early for even op1. (expand_binop): Don't require lshr_optab double-word handler.
Diffstat (limited to 'Makefile.in')
0 files changed, 0 insertions, 0 deletions