summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-08-21 05:02:12 +0000
committerNadav Rotem <nrotem@apple.com>2013-08-21 05:02:12 +0000
commit9397683e629c7aebf27dcdeec05c1c7dceb0f129 (patch)
treec8b5a108d2699d1be7224dad845242b970ae6715 /test/lit.cfg
parent33b5fe7f160886a0718e8cad4ac0d896d5d5c46f (diff)
downloadllvm-9397683e629c7aebf27dcdeec05c1c7dceb0f129.tar.gz
llvm-9397683e629c7aebf27dcdeec05c1c7dceb0f129.tar.bz2
llvm-9397683e629c7aebf27dcdeec05c1c7dceb0f129.tar.xz
Add the FMA3 feature in order to test FMA encoding using the old jit.
Patch by Chris Bieneman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index cd17be1fdb..13323b367b 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -291,6 +291,16 @@ if re.search(r'with assertions', llc_cmd.stdout.read().decode('ascii')):
config.available_features.add('asserts')
llc_cmd.wait()
+if 'darwin' == sys.platform:
+ try:
+ sysctl_cmd = subprocess.Popen(['sysctl', 'hw.optional.fma'],
+ stdout = subprocess.PIPE)
+ except OSError:
+ print("Could not exec sysctl")
+ if -1 != sysctl_cmd.stdout.read().find("hw.optional.fma: 1"):
+ config.available_features.add('fma3')
+ sysctl_cmd.wait()
+
# Check if we should use gmalloc.
use_gmalloc_str = lit_config.params.get('use_gmalloc', None)
if use_gmalloc_str is not None: