[all-commits] [llvm/llvm-project] f6a359: [CodeGen] Teach ReplaceWithVeclib split vector llv...

Kito Cheng via All-commits all-commits at lists.llvm.org
Tue Jul 14 18:54:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f6a359fe20904afe5cc899d3c2fda258322f1f71
      https://github.com/llvm/llvm-project/commit/f6a359fe20904afe5cc899d3c2fda258322f1f71
  Author: Kito Cheng <kito.cheng at sifive.com>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M llvm/lib/CodeGen/ReplaceWithVeclib.cpp
    A llvm/test/CodeGen/X86/sincos-fpmath.ll
    M llvm/test/CodeGen/X86/veclib-llvm.sincos.ll

  Log Message:
  -----------
  [CodeGen] Teach ReplaceWithVeclib split vector llvm.sincos when only sin/cos veclib mappings exist (#194639)

Some vector math libraries provide vector sin and vector cos but no
vector sincos or no sincos with an ABI that LLVM can emit.

The one of the common case is glibc libmvec on x86: it exposes
`_ZGV{b,c,d,e}N{2,4,8,16}vvv_sincos{,f}` symbols, but those use a
vectors-of-pointers output ABI that expandMultipleResultFPLibCall does
not currently support. As a result, sincos will falls back to scalar
sincos calls even when the target has a fully working vector sin and
vector cos.

So we trying to split it into separate sin and cos calls, which will
then be replaced with vector calls if the target supports it, it
generally better than scalarized sincos calls.



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