[all-commits] [llvm/llvm-project] a1beb6: [SimplifyLibCalls] Shrink sin, cos to sinf, cosf w...

Guy David via All-commits all-commits at lists.llvm.org
Thu May 8 21:25:56 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1beb619403a781153c170f041f39a3bac1cebb7
      https://github.com/llvm/llvm-project/commit/a1beb619403a781153c170f041f39a3bac1cebb7
  Author: Guy David <49722543+guy-david at users.noreply.github.com>
  Date:   2025-05-09 (Fri, 09 May 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/Transforms/InstCombine/cos-1.ll
    A llvm/test/Transforms/InstCombine/simplify-intrinsics.ll

  Log Message:
  -----------
  [SimplifyLibCalls] Shrink sin, cos to sinf, cosf when allowed (#139082)

This optimization already exists, but for the libcall versions of these
functions and not for their intrinsic form.
Solves https://github.com/llvm/llvm-project/issues/139044.

There are probably more opportunities for other intrinsics, because the
switch-case in `LibCallSimplifier::optimizeCall` covers only `pow`,
`exp2`, `log`, `log2`, `log10`, `sqrt`, `memset`, `memcpy` and
`memmove`.



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