[PATCH] D101130: [PowerPC] Provide XL-compatible builtins in altivec.h
Jinsong Ji via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 23 07:59:32 PDT 2021
jsji added inline comments.
================
Comment at: clang/lib/Headers/altivec.h:3055
+#ifdef __XL_COMPAT_ALTIVEC__
+/* vec_ctf */
----------------
This only affects __VSX__ version right? If so, can we move `#ifdef __XL_COMPAT_ALTIVEC__` into `#ifdef __VSX__`?
Or even better only into the part of affected types, eg: vector unsinged long long?
================
Comment at: clang/lib/Headers/altivec.h:3065
+ (__b)), \
+ vector unsigned long long \
+ : (__builtin_vsx_xvcvuxdsp((vector unsigned long long)(__a)) * \
----------------
Can we also add comments about what is the major difference with and without `__XL_COMPAT_ALTIVEC__` , for long term maintenance?
================
Comment at: clang/test/CodeGen/builtins-ppc-xlcompat.c:8
+// RUN: -D__XL_COMPAT_ALTIVEC__ | FileCheck %s
+#include <altivec.h>
+vector double vd = { 3.4e22, 1.8e-3 };
----------------
Can we add a RUN line to test that novsx are not affected?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101130/new/
https://reviews.llvm.org/D101130
More information about the cfe-commits
mailing list