[PATCH] D82520: [Power10] Implement Vector Splat Immediate Builtins in LLVM/Clang

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 15:22:19 PDT 2020


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

Other than removing the assert, this LGTM.



================
Comment at: clang/lib/Headers/altivec.h:17116
+    vector signed int __a, const unsigned int __b, const signed int __c) {
+  assert((__b == 0 || __b == 1) && "The second argument must be 0 or 1");
+#ifdef __LITTLE_ENDIAN__
----------------
Sorry that I didn't really pay close enough attention here previously, but please no asserts in the header.
1. The user of the header may not include `<assert.h>`
2. The compiler should not be injecting asserts into user code.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82520/new/

https://reviews.llvm.org/D82520





More information about the llvm-commits mailing list