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

Zvi Rackover via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 09:47:22 PST 2016


Author: zvi
Date: Mon Nov  7 11:47:21 2016
New Revision: 286125

URL: http://llvm.org/viewvc/llvm-project?rev=286125&view=rev
Log:
[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.


Modified:
    llvm/trunk/utils/update_llc_test_checks.py

Modified: llvm/trunk/utils/update_llc_test_checks.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/update_llc_test_checks.py?rev=286125&r1=286124&r2=286125&view=diff
==============================================================================
--- llvm/trunk/utils/update_llc_test_checks.py (original)
+++ llvm/trunk/utils/update_llc_test_checks.py Mon Nov  7 11:47:21 2016
@@ -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




More information about the llvm-commits mailing list