[all-commits] [llvm/llvm-project] 715fc4: [Sparc] Don't emit __multi3 on 32-bit SPARC (#66362)

Rainer Orth via All-commits all-commits at lists.llvm.org
Thu Sep 14 22:32:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 715fc4fc6065ef06e3312d33c26412313df7b29a
      https://github.com/llvm/llvm-project/commit/715fc4fc6065ef06e3312d33c26412313df7b29a
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M llvm/lib/Target/Sparc/SparcISelLowering.cpp
    M llvm/test/CodeGen/SPARC/smulo-128-legalisation-lowering.ll
    M llvm/test/CodeGen/SPARC/umulo-128-legalisation-lowering.ll

  Log Message:
  -----------
  [Sparc] Don't emit __multi3 on 32-bit SPARC (#66362)

LLVM fails to build on 32-bit Solaris/SPARC: several programs fail to
link due to undefined references to `__multi3`. This reference is from
`lib/libLLVMScalarOpts.a(LoopStrengthReduce.cpp.o)`. However, This
function exists neither in the 32-bit `libgcc.a` nor in
`libclang_rt.builtins-sparc.a`. It's only defined in their 64-bit
counterparts.

The same issue affects several 32-bit targets, e.g. 32-bit PowerPC as
described in Issue #54460. The fix is the same: inhibit the libcall for
32-bit compilations. This patch does just that, regenerating the
affected testcases. It allows the build to complete.

Tested on `sparc-sun-solaris2.11`.




More information about the All-commits mailing list