From: MITSUNARI Shigeo <[email protected]>

Changes since v8 (all in [1/2], addressing Jeff Law's review):
- Replace the goto with an if (quotient == NULL_RTX) block and
  reindent the classic sub/shift/add sequence accordingly.  The
  skipped code itself is unchanged.
- Add gcc_checking_assert (post_shift <= size) and comments to
  expand_wide_mulh_udiv documenting why the magic shift count is
  never negative (choose_multiplier guarantees post_shift <=
  ceil_log2 (d) <= size) and why the magic constant cannot overflow
  (it is below 2^(2*size) and 2*size <= HOST_BITS_PER_WIDE_INT is
  already checked).
- [2/2] is unchanged (approved by Uros Bizjak).

MITSUNARI Shigeo (2):
  expmed: Optimize 32-bit unsigned division by constants on 64-bit
    targets
  i386: Add BMI2 MULX pattern for highpart-only multiplication

 gcc/config/i386/i386.md                       |  15 +++
 gcc/expmed.cc                                 | 105 +++++++++++++++---
 .../gcc.target/i386/bmi2-mulx-highpart-1.c    |  23 ++++
 gcc/testsuite/gcc.target/i386/mulq-highpart.c |  22 ++++
 4 files changed, 149 insertions(+), 16 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/i386/bmi2-mulx-highpart-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/mulq-highpart.c

-- 
2.43.0

Reply via email to