From: Zvi Rackover Date: Mon, 7 Nov 2016 17:47:21 +0000 (+0000) Subject: [X86] Fix test checks script to handle run lines with no pipe checks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b54369e1887105d84d438f2b1ec82551d324eb04;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286125 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/update_llc_test_checks.py b/utils/update_llc_test_checks.py index d2df5b6511e..12faa806be4 100755 --- a/utils/update_llc_test_checks.py +++ b/utils/update_llc_test_checks.py @@ -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