[llvm] r188865 - Add the FMA3 feature in order to test FMA encoding using the old jit.
Nadav Rotem
nrotem at apple.com
Tue Aug 20 22:02:12 PDT 2013
Author: nadav
Date: Wed Aug 21 00:02:12 2013
New Revision: 188865
URL: http://llvm.org/viewvc/llvm-project?rev=188865&view=rev
Log:
Add the FMA3 feature in order to test FMA encoding using the old jit.
Patch by Chris Bieneman!
Modified:
llvm/trunk/test/lit.cfg
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=188865&r1=188864&r2=188865&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Wed Aug 21 00:02:12 2013
@@ -291,6 +291,16 @@ if re.search(r'with assertions', llc_cmd
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:
More information about the llvm-commits
mailing list