[all-commits] [llvm/llvm-project] b2ca4d: [LegalizeTypes] Add a simple expansion for SMULO w...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Aug 6 09:43:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b2ca4dc935859b324fd7e9ca804160913a7468a5
      https://github.com/llvm/llvm-project/commit/b2ca4dc935859b324fd7e9ca804160913a7468a5
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    A llvm/test/CodeGen/X86/smulo-128-legalisation-lowering.ll

  Log Message:
  -----------
  [LegalizeTypes] Add a simple expansion for SMULO when a libcall isn't available.

This isn't optimal, but prevents crashing when the libcall isn't
available. It just calculates the full product and makes sure the high bits
match the sign of the low half. Each of the pieces should go through their own
type legalization.

This can make D107420 unnecessary.

Needs tests, but I wanted to start discussion about D107420.

Reviewed By: FreddyYe

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




More information about the All-commits mailing list