[all-commits] [llvm/llvm-project] a356e6: [SelectionDAG] Expand fixed point multiplication i...

PiJoules via All-commits all-commits at lists.llvm.org
Tue Jan 30 13:59:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a356e6ccada87d6bfc4513fba4b1a682305e094a
      https://github.com/llvm/llvm-project/commit/a356e6ccada87d6bfc4513fba4b1a682305e094a
  Author: PiJoules <6019989+PiJoules at users.noreply.github.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    A llvm/test/CodeGen/Thumb/smul_fix.ll
    A llvm/test/CodeGen/Thumb/smul_fix_sat.ll
    A llvm/test/CodeGen/Thumb/umul_fix.ll
    A llvm/test/CodeGen/Thumb/umul_fix_sat.ll

  Log Message:
  -----------
  [SelectionDAG] Expand fixed point multiplication into libcall (#79352)

32-bit ARMv6 with thumb doesn't support MULHS/MUL_LOHI as legal/custom
nodes during expansion which will cause fixed point multiplication of
_Accum types to fail with fixed point arithmetic. Prior to this, we just
happen to use fixed point multiplication on platforms that happen to
support these MULHS/MUL_LOHI.

This patch attempts to check if the multiplication can be done via
libcalls, which are provided by the arm runtime. These libcall attempts
are made elsewhere, so this patch refactors that libcall logic into its
own functions and the fixed point expansion calls and reuses that logic.




More information about the All-commits mailing list