[PATCH] D25950: [PPC] add float and double overloads for vec_orc and vec_nand in altivec.h

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 11:00:08 PDT 2016

amehsan added inline comments.

Comment at: lib/Headers/altivec.h:5273-5278
+static __inline__ vector float __ATTRS_o_ai
+vec_nand(vector float __a, vector float __b) {
+  return (vector float)(~((vector unsigned int)__a &
+                          (vector unsigned int)__b));
@kbarton Using C-style cast here, violates strict aliasing. Is that correct? Could it lead to functional problems if someone compiles their code WITHOUT  -fno-strict-aliasing while using this built-ins? For example if this built-in is used in a context where __a and __b are deferenced pointers? Note that this will be inlined. 



More information about the llvm-commits mailing list