[all-commits] [llvm/llvm-project] 378fe2: [X86][LoopVectorize] Add support for arc and hyper...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Sun Jul 28 17:58:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 378fe2fc23fa56181577d411fe6d51fa531cd860
      https://github.com/llvm/llvm-project/commit/378fe2fc23fa56181577d411fe6d51fa531cd860
  Author: Farzon Lotfi <1802579+farzonl at users.noreply.github.com>
  Date:   2024-07-28 (Sun, 28 Jul 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/VecFuncs.def
    M llvm/test/CodeGen/X86/fp-strict-libcalls-msvc32.ll
    M llvm/test/CodeGen/X86/vec-libcalls.ll
    M llvm/test/Transforms/LoopVectorize/X86/amdlibm-calls.ll
    M llvm/test/Transforms/LoopVectorize/X86/veclib-calls.ll

  Log Message:
  -----------
  [X86][LoopVectorize] Add support for arc and hyperbolic trig functions (#99383)

This change is part 2 x86 Loop Vectorization of :
https://github.com/llvm/llvm-project/pull/96222

It also has veclib call loop vectorization hence the test cases in
`llvm/test/Transforms/LoopVectorize/X86/veclib-calls.ll`

finally the last pr missed tests for
`llvm/test/CodeGen/X86/fp-strict-libcalls-msvc32.ll` and
`llvm/test/CodeGen/X86/vec-libcalls.ll` so added those aswell.

No evidence was found for arc and hyperbolic trig glibc vector math
functions

https://github.com/lattera/glibc/blob/master/sysdeps/x86/fpu/bits/math-vector.h
so no  new `_ZGVbN2v_*` and  `_ZGVdN4v_*` .
So no new tests in
`llvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll`

Also no new svml and no new tests to:
`llvm/test/Transforms/LoopVectorize/X86/svml-calls.ll`
There was not enough evidence that there were svml arc and hyperbolic
trig vector implementations, Documentation was scarces so looked at test
cases in
[numpy](https://github.com/numpy/SVML/blob/32bf2a98420762a63ab418aaa0a7d6e17eb9627a/linux/avx512/svml_z0_acos_d_la.s#L8).
Someone with more experience with svml should investigate.

## Note 
amd libm doesn't have a vector hyperbolic sine api hence why youi might
notice there are no tests for `sinh`.

## History
This change is part of
https://github.com/llvm/llvm-project/issues/87367's investigation on
supporting IEEE math operations as intrinsics.
Which was discussed in this RFC:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294

This change adds loop vectorization for `acos`, `asin`, `atan`, `cosh`,
`sinh`, and `tanh`.
resolves #70079
resolves #70080
resolves #70081
resolves #70083
resolves #70084
resolves #95966



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