[all-commits] [llvm/llvm-project] ddccc5: [CodeGen] Always expand division larger than i128

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Mar 1 06:34:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ddccc5ba4479a36dd4821f0948e118438fbf2e56
      https://github.com/llvm/llvm-project/commit/ddccc5ba4479a36dd4821f0948e118438fbf2e56
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-03-01 (Wed, 01 Mar 2023)

  Changed paths:
    M llvm/lib/CodeGen/TargetLoweringBase.cpp
    A llvm/test/CodeGen/Mips/idiv_large.ll
    A llvm/test/CodeGen/PowerPC/idiv_large.ll
    A llvm/test/CodeGen/RISCV/idiv_large.ll

  Log Message:
  -----------
  [CodeGen] Always expand division larger than i128

Default MaxDivRemBitWidthSupported to 128, so that divisions larger
than 128 bits are always expanded, without requiring additional
configuration from the target.

Note that this may still emit calls to __udivti3 on 32-bit targets,
which likely don't have an implementation of that builtin. However,
I believe this is sufficient to fix
https://github.com/llvm/llvm-project/issues/60531, because Zig must
already be defining those builtins.

Differential Revision: https://reviews.llvm.org/D144871




More information about the All-commits mailing list