[all-commits] [llvm/llvm-project] dbb6a7: [LibCalls] Respect TLI.getExtAttrForI32Param() in ...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Tue Apr 5 01:30:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbb6a75fbb3679a03edf6f4bc7e7262f751b6dfc
      https://github.com/llvm/llvm-project/commit/dbb6a75fbb3679a03edf6f4bc7e7262f751b6dfc
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2022-04-05 (Tue, 05 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
    M llvm/test/Transforms/InferFunctionAttrs/annotate.ll

  Log Message:
  -----------
  [LibCalls] Respect TLI.getExtAttrForI32Param() in inferLibFuncAttributes().

getExtAttrForI32Param() is the method to be used for determining the type of
extension attribute (if any) that is to be added for a signed/unsigned
argument.

Previously, the SExt attribute was always added to the i32 ldexp* argument as
it was expected to be ignored by targets not needing it. This patch now
changes this so that it is only added for the targets that need it in the
first place.

Putchar() argument is now also extended as required by the target (SystemZ in
the test), to fix the issue below. Many more libcalls will be handled
similarly in a following patch.

Fixes https://github.com/llvm/llvm-project/issues/54532.

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

Review: Eli Friedman




More information about the All-commits mailing list