Use vec_revb when POWER9 is available

pull/748/head
Jeffrey Walton 2018-11-23 12:16:45 -05:00
parent 4020ba7058
commit 39aaec7c59
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 7 additions and 3 deletions

View File

@ -123,8 +123,12 @@ inline uint32x4_p VecOne()
template <class T>
inline T VecReverse(const T data)
{
#if (_ARCH_PWR9)
return (T)vec_revb((uint8x16_p)data);
#else
const uint8x16_p mask = {15,14,13,12, 11,10,9,8, 7,6,5,4, 3,2,1,0};
return (T)vec_perm(data, data, mask);
#endif
}
//////////////////////// Loads ////////////////////////