[all-commits] [llvm/llvm-project] 19b29b: [PowerPC] Provide XL-compatible builtins in altivec.h

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Fri Apr 23 13:15:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19b29b1ed1baa3c91a8e48204a8fb229bf07f548
      https://github.com/llvm/llvm-project/commit/19b29b1ed1baa3c91a8e48204a8fb229bf07f548
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M clang/lib/Headers/altivec.h
    A clang/test/CodeGen/builtins-ppc-xlcompat.c

  Log Message:
  -----------
  [PowerPC] Provide XL-compatible builtins in altivec.h

There are some interfaces in altivec.h that are not compatible
between Clang and XL (although Clang is compatible with GCC).
Currently, we have found 3 but there may be others.

Clang/GCC signatures:

vector double vec_ctf(vector signed long long)
vector double vec_ctf(vector unsigned long long)
vector signed long long vec_cts(vector double)
vector unsigned long long vec_ctu(vector double)

XL signatures:

vector float vec_ctf(vector signed long long)
vector float vec_ctf(vector unsigned long long)
vector signed int vec_cts(vector double)
vector unsigned int vec_ctu(vector double)

This patch provides the XL behaviour under the __XL_COMPAT_ALTIVEC__
macro for users that rely on XL behaviour.

Differential revision: https://reviews.llvm.org/D101130




More information about the All-commits mailing list