[X86] Fix test checks script to handle run lines with no pipe checks

Fixes crashes in tests such as test/CodeGen/X86/masked_gather_scatter.ll which
contains a RUN: with no pipe chain.

llvm-svn: 286125
This commit is contained in:
Zvi Rackover 2016-11-07 17:47:21 +00:00
parent a09c7e7e66
commit 35a5acf8ad
1 changed files with 5 additions and 1 deletions

View File

@ -164,7 +164,11 @@ def main():
prefix_list = []
for l in run_lines:
(llc_cmd, filecheck_cmd) = tuple([cmd.strip() for cmd in l.split('|', 1)])
commands = [cmd.strip() for cmd in l.split('|', 1)]
llc_cmd = commands[0]
filecheck_cmd = ''
if len(commands) > 1:
filecheck_cmd = commands[1]
if not llc_cmd.startswith('llc '):
print >>sys.stderr, 'WARNING: Skipping non-llc RUN line: ' + l
continue