From: Luo Xionghu <[email protected]>

the overflow intrinsics are introduced since llvm-3.5.

v2: no need to exclude bswap test since llvm-3.3 supports it.

Signed-off-by: Luo Xionghu <[email protected]>
---
 utests/compiler_overflow.cpp |    2 ++
 1 file changed, 2 insertions(+)

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

Reply via email to