[PATCH] D101130: [PowerPC] Provide XL-compatible builtins in altivec.h

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 22 20:42:50 PDT 2021


nemanjai created this revision.
nemanjai added reviewers: cebowleratibm, hubert.reinterpretcast, bmahjour, PowerPC.
Herald added subscribers: shchenz, kbarton.
nemanjai requested review of this revision.
Herald added a project: clang.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101130

Files:
  clang/lib/Headers/altivec.h
  clang/test/CodeGen/builtins-ppc-xlcompat.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101130.339859.patch
Type: text/x-patch
Size: 6517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210423/68d7a2cd/attachment.bin>


More information about the cfe-commits mailing list