[all-commits] [llvm/llvm-project] 8788b6: SimplifyLibCalls: Don't require ldexp to emit intr...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Jun 10 09:21:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8788b666aaaf4658bbaab7459968ba2bca13f529
      https://github.com/llvm/llvm-project/commit/8788b666aaaf4658bbaab7459968ba2bca13f529
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-06-10 (Mon, 10 Jun 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/LTO/X86/triple-init2.ll
    M llvm/test/Transforms/InstCombine/exp2-1.ll
    M llvm/test/Transforms/InstCombine/exp2-to-ldexp.ll
    M llvm/test/Transforms/InstCombine/pow-to-ldexp.ll

  Log Message:
  -----------
  SimplifyLibCalls: Don't require ldexp to emit intrinsic in exp2 combine (#92707)

When folding exp2(itofp(x)) to ldexp(1, x), don't require an ldexp
libcall to emit the intrinsic.

The intrinsic needs to be handled regardless of whether the system has a
libcall, and we have an inline implementation of ldexp already. This
fixes the instance in the exp2->ldexp fold. Another instance exists for
the pow(2) -> ldexp case

The LTO test change isn't ideal, since it's just moving the problem to
another instance where we're relying on implied libm behavior for an
intrinsic transform. Use exp10 since that's a harder case to solve in
the libcall house of cards we have.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list