From cd8d622fc9005cca8be10a633834ccbfac64bb2f Mon Sep 17 00:00:00 2001 From: Siu Kwan Lam Date: Wed, 27 Feb 2013 18:34:00 -0600 Subject: [PATCH] Fix mysin test for AVX support --- llvm/test_llvmpy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/llvm/test_llvmpy.py b/llvm/test_llvmpy.py index 27fd59c..04170b4 100644 --- a/llvm/test_llvmpy.py +++ b/llvm/test_llvmpy.py @@ -1152,7 +1152,13 @@ class TestIntrinsic(TestCase): # declare float @llvm.cos.f32(float) nounwind readnone # let's run the function - ee = le.ExecutionEngine.new(mod) + + from llvm.workaround.avx_support import detect_avx_support + if not detect_avx_support(): + ee = le.EngineBuilder.new(mod).mattrs("-avx").create() + else: + ee = le.EngineBuilder.new(mod).create() + arg = le.GenericValue.real(Type.float(), 1.234) retval = ee.run_function(mysin, [arg])