bswap works fine with 3.3.1. Could you double check?

On Mon, Dec 15, 2014 at 11:14:46AM +0800, [email protected] wrote:
> From: Luo Xionghu <[email protected]>
> 
> the bswap and overflow intrinsics are introduced since llvm-3.5.
> 
> Signed-off-by: Luo Xionghu <[email protected]>
> ---
>  utests/compiler_bswap.cpp    |    2 ++
>  utests/compiler_overflow.cpp |    2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/utests/compiler_bswap.cpp b/utests/compiler_bswap.cpp
> index 9475b99..1ed5dcf 100644
> --- a/utests/compiler_bswap.cpp
> +++ b/utests/compiler_bswap.cpp
> @@ -110,7 +110,9 @@ static void compiler_bswap_ ##type(void)\
>  }\
>  MAKE_UTEST_FROM_FUNCTION(compiler_bswap_ ## type);
>  
> +#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5
>  compiler_bswap(int16_t, compiler_bswap_short)
>  compiler_bswap(uint16_t, compiler_bswap_ushort)
>  compiler_bswap(int32_t, compiler_bswap_int)
>  compiler_bswap(uint32_t, compiler_bswap_uint)
> +#endif
> diff --git a/utests/compiler_overflow.cpp b/utests/compiler_overflow.cpp
> index 5517b5a..2188551 100644
> --- a/utests/compiler_overflow.cpp
> +++ b/utests/compiler_overflow.cpp
> @@ -171,6 +171,7 @@ static void compiler_overflow_sub_ ##type(void)\
>  }\
>  MAKE_UTEST_FROM_FUNCTION(compiler_overflow_sub_ ## type);
>  
> +#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5
>  compiler_overflow_add(ulong4, unsigned long, compiler_overflow_ulong4_add, 0)
>  compiler_overflow_add(uint4, uint32_t, compiler_overflow_uint4_add, 0)
>  compiler_overflow_add(ushort4, uint16_t, compiler_overflow_ushort4_add, 0)
> @@ -179,3 +180,4 @@ compiler_overflow_add(uchar4, uint8_t, 
> compiler_overflow_uchar4_add, 0)
>  // as llvm intrincs function doesn't support byte/short overflow,
>  // we just test uint overflow here.
>  compiler_overflow_sub(uint4, uint32_t, compiler_overflow_uint4_sub, 1)
> +#endif
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Beignet mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to