1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Add the FMA3 feature in order to test FMA encoding using the old jit.

Patch by Chris Bieneman!

llvm-svn: 188865
This commit is contained in:
Nadav Rotem 2013-08-21 05:02:12 +00:00
parent 33a600320c
commit aa3ca5312e

View File

@ -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: