OSDN Git Service

Clean up run script to use for testing Subzero.
authorKarl Schimpf <kschimpf@google.com>
Thu, 25 Sep 2014 16:37:49 +0000 (09:37 -0700)
committerKarl Schimpf <kschimpf@google.com>
Thu, 25 Sep 2014 16:37:49 +0000 (09:37 -0700)
Adds the python script run-llvm2ice.py (was llvm2iceinsts.py) that
automatically handles conversion of LLVM source to a PEXE file,
and then runs llvm2ice on the corresponding PEXE file.

Also, defines three paths in tests, based on the executable chosen:

  %lc2i - Directly reads from LLVM source, and converts to Subzero.
  %l2i  - Parses a PEXE file into LLVM IR, and converts to Subzero.
  %p2i  - Parses a PEXE directly into Subzero.

Note that for all three executables, the same arguments can be used,
making it easy to change how the input is handled.

Also moves tests to use %p2i whenever possible.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3892
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/600043002

81 files changed:
pydir/llvm2iceinsts.py [deleted file]
pydir/run-llvm2ice.py [new file with mode: 0755]
tests_lit/lit.cfg
tests_lit/llvm2ice_tests/64bit.pnacl.ll
tests_lit/llvm2ice_tests/addr-opt-multi-def-var.ll
tests_lit/llvm2ice_tests/address-mode-opt.ll
tests_lit/llvm2ice_tests/align-spill-locations.ll
tests_lit/llvm2ice_tests/alloc.ll
tests_lit/llvm2ice_tests/arith-opt.ll
tests_lit/llvm2ice_tests/arithmetic-chain.ll
tests_lit/llvm2ice_tests/bitcast.ll
tests_lit/llvm2ice_tests/bool-opt.ll
tests_lit/llvm2ice_tests/branch-opt.ll
tests_lit/llvm2ice_tests/branch-simple.ll
tests_lit/llvm2ice_tests/call.ll
tests_lit/llvm2ice_tests/callindirect.pnacl.ll
tests_lit/llvm2ice_tests/casts.ll
tests_lit/llvm2ice_tests/cmp-opt.ll
tests_lit/llvm2ice_tests/convert.ll
tests_lit/llvm2ice_tests/div_legalization.ll
tests_lit/llvm2ice_tests/ebp_args.ll
tests_lit/llvm2ice_tests/empty-func.ll
tests_lit/llvm2ice_tests/fp.pnacl.ll
tests_lit/llvm2ice_tests/fpcall.ll
tests_lit/llvm2ice_tests/fpconst.pnacl.ll
tests_lit/llvm2ice_tests/function_aligned.ll
tests_lit/llvm2ice_tests/global.ll
tests_lit/llvm2ice_tests/globalinit.pnacl.ll
tests_lit/llvm2ice_tests/icmp-simple.ll
tests_lit/llvm2ice_tests/load.ll
tests_lit/llvm2ice_tests/mangle.ll
tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll
tests_lit/llvm2ice_tests/nacl-atomic-errors.ll
tests_lit/llvm2ice_tests/nacl-atomic-fence-all.ll
tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll
tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll
tests_lit/llvm2ice_tests/nop-insertion.ll
tests_lit/llvm2ice_tests/phi.ll
tests_lit/llvm2ice_tests/regalloc_evict_non_overlap.ll
tests_lit/llvm2ice_tests/return-int-arg.ll
tests_lit/llvm2ice_tests/returns_twice_no_coalesce.ll
tests_lit/llvm2ice_tests/sdiv.ll
tests_lit/llvm2ice_tests/select-opt.ll
tests_lit/llvm2ice_tests/shift.ll
tests_lit/llvm2ice_tests/simple-loop.ll
tests_lit/llvm2ice_tests/store.ll
tests_lit/llvm2ice_tests/struct-arith.pnacl.ll
tests_lit/llvm2ice_tests/switch-opt.ll
tests_lit/llvm2ice_tests/test_i1.ll
tests_lit/llvm2ice_tests/undef.ll
tests_lit/llvm2ice_tests/unnamed.ll
tests_lit/llvm2ice_tests/unreachable.ll
tests_lit/llvm2ice_tests/vector-arg.ll
tests_lit/llvm2ice_tests/vector-arith.ll
tests_lit/llvm2ice_tests/vector-bitcast.ll
tests_lit/llvm2ice_tests/vector-cast.ll
tests_lit/llvm2ice_tests/vector-fcmp.ll
tests_lit/llvm2ice_tests/vector-icmp.ll
tests_lit/llvm2ice_tests/vector-ops.ll
tests_lit/llvm2ice_tests/vector-select.ll
tests_lit/reader_tests/alloca.ll
tests_lit/reader_tests/binops.ll
tests_lit/reader_tests/branch.ll
tests_lit/reader_tests/call-indirect.ll
tests_lit/reader_tests/call.ll
tests_lit/reader_tests/casts.ll
tests_lit/reader_tests/compare.ll
tests_lit/reader_tests/constants.ll
tests_lit/reader_tests/forwardref.ll
tests_lit/reader_tests/globalinit.pnacl.ll
tests_lit/reader_tests/insertextract.ll
tests_lit/reader_tests/load.ll
tests_lit/reader_tests/nacl-atomic-intrinsics.ll
tests_lit/reader_tests/nacl-fake-intrinsic.ll
tests_lit/reader_tests/nacl-other-intrinsics.ll
tests_lit/reader_tests/phi.ll
tests_lit/reader_tests/select.ll
tests_lit/reader_tests/store.ll
tests_lit/reader_tests/switch.ll
tests_lit/reader_tests/unnamed.ll
tests_lit/reader_tests/unreachable.ll

diff --git a/pydir/llvm2iceinsts.py b/pydir/llvm2iceinsts.py
deleted file mode 100755 (executable)
index 9861242..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python2
-
-import argparse
-import itertools
-import os
-import re
-import subprocess
-import sys
-
-from utils import shellcmd
-
-if __name__ == '__main__':
-    desc = 'Run llvm2ice on llvm file to produce ICE instructions.'
-    argparser = argparse.ArgumentParser(
-        description=desc,
-        formatter_class=argparse.ArgumentDefaultsHelpFormatter,
-        epilog='''
-        Runs in two modes, depending on whether the flag '--pnacl' is specified.
-
-        If flag '--pnacl' is omitted, it runs llvm2ice to (directly) generate
-        the corresponding ICE instructions.
-
-        If flag '--pnacl' is given, it first assembles and freezes the
-        llvm source file generating the corresponding PNaCl bitcode
-        file. The PNaCl bitcode file is then piped into llvm2ice to
-        generate the corresponding ICE instructions.
-        ''')
-    argparser.add_argument(
-        '--llvm2ice', required=False, default='./llvm2ice', metavar='LLVM2ICE',
-        help='Path to llvm2ice driver program')
-    argparser.add_argument('--llvm-bin-path', required=False,
-                           default=None, metavar='LLVM_BIN_PATH',
-                           help='Path to LLVM executables ' +
-                                '(for building PNaCl files)')
-    argparser.add_argument('--pnacl', required=False,
-                           action='store_true',
-                           help='Convert llvm source to PNaCl bitcode ' +
-                                'file first')
-    argparser.add_argument('--echo-cmd', required=False,
-                           action='store_true',
-                           help='Trace command that generates ICE instructions')
-    argparser.add_argument('llfile', nargs=1,
-                           metavar='LLVM_FILE',
-                           help='Llvm source file')
-
-    args = argparser.parse_args()
-    llvm_bin_path = args.llvm_bin_path
-    llfile = args.llfile[0]
-
-    cmd = []
-    if args.pnacl:
-      cmd = [os.path.join(llvm_bin_path, 'llvm-as'), llfile, '-o', '-', '|',
-             os.path.join(llvm_bin_path, 'pnacl-freeze'),
-             '--allow-local-symbol-tables', '|']
-    cmd += [args.llvm2ice, '-verbose', 'inst', '-notranslate']
-    if args.pnacl:
-      cmd += ['--allow-local-symbol-tables', '--bitcode-format=pnacl']
-    else:
-      cmd.append(llfile)
-
-    stdout_result = shellcmd(cmd, echo=args.echo_cmd)
-    if not args.echo_cmd:
-      sys.stdout.write(stdout_result)
diff --git a/pydir/run-llvm2ice.py b/pydir/run-llvm2ice.py
new file mode 100755 (executable)
index 0000000..583d7f8
--- /dev/null
@@ -0,0 +1,89 @@
+#!/usr/bin/env python2
+
+import argparse
+import itertools
+import os
+import re
+import subprocess
+import sys
+
+from utils import shellcmd
+
+def main():
+    """Run the llvm2ice compiler on an llvm file.
+
+    Takes an llvm input file, freezes it into a pexe file, converts
+    it to a Subzero program, and finally compiles it.
+    """
+    argparser = argparse.ArgumentParser(
+        description='    ' + main.__doc__,
+        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+    argparser.add_argument('--input', '-i', required=True,
+                           help='LLVM source file to compile')
+    argparser.add_argument('--insts', required=False,
+                           action='store_true',
+                           help='Stop after translating to ' +
+                           'Subzero instructions')
+    argparser.add_argument('--no-local-syms', required=False,
+                           action='store_true',
+                           help="Don't keep local symbols in the pexe file")
+    argparser.add_argument('--llvm', required=False,
+                           action='store_true',
+                           help='Parse pexe into llvm IR first, then ' +
+                           'convert to Subzero')
+    argparser.add_argument('--llvm-source', required=False,
+                           action='store_true',
+                           help='Parse source directly into llvm IR ' +
+                           '(without generating a pexe), then ' +
+                           'convert to Subzero')
+    argparser.add_argument(
+        '--llvm2ice', required=False, default='./llvm2ice', metavar='LLVM2ICE',
+        help="Subzero translator 'llvm2ice'")
+    argparser.add_argument('--llvm-bin-path', required=False,
+                           default=None, metavar='LLVM_BIN_PATH',
+                           help='Path to LLVM executables ' +
+                                '(for building PEXE files)')
+    argparser.add_argument('--echo-cmd', required=False,
+                           action='store_true',
+                           help='Trace command that generates ICE instructions')
+    argparser.add_argument('--args', '-a', nargs=argparse.REMAINDER,
+                           help='Remaining arguments are passed to llvm2ice')
+
+    args = argparser.parse_args()
+    llvm_bin_path = args.llvm_bin_path
+    llfile = args.input
+
+    if args.llvm and args.llvm_source:
+      raise RuntimeError("Can't specify both '--llvm' and '--llvm-source'")
+
+    if args.llvm_source and args.no_local_syms:
+      raise RuntimeError("Can't specify both '--llvm-source' and " +
+                         "'--no-local-syms'")
+
+    cmd = []
+    if not args.llvm_source:
+      cmd = [os.path.join(llvm_bin_path, 'llvm-as'), llfile, '-o', '-', '|',
+             os.path.join(llvm_bin_path, 'pnacl-freeze')]
+      if not args.no_local_syms:
+        cmd += ['--allow-local-symbol-tables']
+      cmd += ['|']
+    cmd += [args.llvm2ice]
+    if args.insts:
+      cmd += ['-verbose', 'inst', '-notranslate']
+    if not args.llvm_source:
+      cmd += ['--bitcode-format=pnacl']
+      if not args.no_local_syms:
+        cmd += ['--allow-local-symbol-tables']
+    if not (args.llvm or args.llvm_source):
+      cmd += ['--build-on-read']
+    if args.args:
+      cmd += args.args
+    if args.llvm_source:
+      cmd += [llfile]
+
+    stdout_result = shellcmd(cmd, echo=args.echo_cmd)
+    if not args.echo_cmd:
+      sys.stdout.write(stdout_result)
+
+if __name__ == '__main__':
+    main()
index f1d3c74..825f7d2 100644 (file)
@@ -39,11 +39,33 @@ llvmbinpath = os.path.abspath(os.environ.get('LLVM_BIN_PATH'))
 
 # Finding Subzero tools
 llvm2icetool = os.path.join(bin_root, 'llvm2ice')
+
+# Convert LLVM source to PNaCl bitcode, read using the
+# Subzero bitcode reader, and then translate.
+config.substitutions.append(
+  ('%p2i', ' '.join([os.path.join(pydir, 'run-llvm2ice.py'),
+                     '--llvm2ice', llvm2icetool,
+                     '--llvm-bin-path', llvmbinpath
+                    ])))
+
+# Convert LLVM source to PNaCl bitcode, read using the PNaCl bitcode reader,
+# convert to ICE using the ICE Converter, and then translate.
+# TODO(kschimpf) Deprecated, remove once p2i working.
 config.substitutions.append(
-  ('%llvm2iceinsts', ' '.join([os.path.join(pydir, 'llvm2iceinsts.py'),
-                               '--llvm2ice', llvm2icetool,
-                               '--llvm-bin-path', llvmbinpath
-                             ])))
+  ('%l2i', ' '.join([os.path.join(pydir, 'run-llvm2ice.py'),
+                     '--llvm', '--llvm2ice', llvm2icetool,
+                     '--llvm-bin-path', llvmbinpath
+                    ])))
+
+# Read LLVM source, convert to ICE using the ICE converter, and then translate.
+# Note: l2i is preferred over lc2i, since it uses PNaCl bitcode.
+# TODO(kschimpf) Deprecated, remove once p2i working.
+config.substitutions.append(
+  ('%lc2i', ' '.join([os.path.join(pydir, 'run-llvm2ice.py'),
+                      '--llvm-source', '--llvm2ice', llvm2icetool,
+                      '--llvm-bin-path', llvmbinpath
+                    ])))
+
 config.substitutions.append(('%llvm2ice', llvm2icetool))
 config.substitutions.append(('%szdiff', os.path.join(pydir, 'szdiff.py')))
 
index d8c6e6b..b392767 100644 (file)
@@ -6,19 +6,18 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OPTM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
index 5f5c7c4..e5754ae 100644 (file)
@@ -5,7 +5,7 @@
 ; This test depends to some degree on the stability of "--verbose
 ; addropt" output format.
 
-; RUN: %llvm2ice -O2 --verbose addropt %s | FileCheck %s
+; RUN: %p2i -i %s --args -O2 --verbose addropt | FileCheck %s
 
 declare i32 @_calloc_r(i32, i32, i32)
 
index 34231d0..997349a 100644 (file)
@@ -1,9 +1,9 @@
 ; This file checks support for address mode optimization.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
 
 define float @load_arg_plus_200000(float* %arg) {
 entry:
index 5bd7c56..ba7303f 100644 (file)
@@ -1,12 +1,13 @@
 ; This checks to ensure that Subzero aligns spill slots.
 
-; RUN: %llvm2ice --verbose none %s \
+; TODO(kschimpf) Find out why lc2i needed.
+; RUN: %lc2i -i %s --args --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %lc2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
 
 ; The location of the stack slot for a variable is inferred from the
 ; return sequence.
index d690a19..b801304 100644 (file)
@@ -1,15 +1,14 @@
 ; This is a basic test of the alloca instruction.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @fixed_416_align_16(i32 %n) {
 entry:
index bc1a6a3..705c55c 100644 (file)
@@ -1,11 +1,9 @@
 ; This is a very early test that just checks the representation of i32
 ; arithmetic instructions.  No assembly tests are done.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @Add(i32 %a, i32 %b) {
 ; CHECK: define i32 @Add
index 01ec91a..bc2285b 100644 (file)
@@ -2,11 +2,9 @@
 ; arithmetic instructions, i64, variables, and constants.  No assembly
 ; tests are done.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i64 @arithmetic_chain(i64 %foo, i64 %bar) {
 entry:
index 7d85e07..fd5ccdb 100644 (file)
@@ -1,15 +1,13 @@
 ; Trivial smoke test of bitcast between integer and FP types.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define internal i32 @cast_f2i(float %f) {
 entry:
index 2484327..3f88d99 100644 (file)
@@ -1,10 +1,8 @@
 ; Trivial smoke test of icmp without fused branch opportunity.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @testBool(i32 %a, i32 %b) {
 entry:
index cb716dd..37dc548 100644 (file)
@@ -1,18 +1,16 @@
 ; Tests the branch optimizations under O2 (against a lack of
 ; optimizations under Om1).
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=O2 %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 declare void @dummy()
 
index d055bdb..8293f3d 100644 (file)
@@ -4,12 +4,10 @@
 ; we don't lower to a cmp instructions with an immediate as the first
 ; source operand.
 
-; RUN: %llvm2ice -O2 --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args -O2 --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args -Om1 --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @simple_cond_branch(i32 %foo, i32 %bar) {
 entry:
index 41dcf09..ee9c74c 100644 (file)
@@ -1,11 +1,9 @@
 ; Simple smoke test of the call instruction.  The assembly checks
 ; currently only verify the function labels.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @fib(i32 %n) {
 ; CHECK: define i32 @fib
index 0636107..cabf2aa 100644 (file)
@@ -2,17 +2,16 @@
 ; should be to the same operand, whether it's in a register or on the
 ; stack.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OPTM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find reason why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
index 7016cfd..66284e2 100644 (file)
@@ -1,8 +1,6 @@
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i64 @simple_zext(i32 %arg) {
 entry:
index 305dc10..ddc3c98 100644 (file)
@@ -1,16 +1,14 @@
 ; Simple test of non-fused compare/branch.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OPTM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @testBool(i32 %a, i32 %b) {
 entry:
index 95b5e7d..b2066e3 100644 (file)
@@ -3,16 +3,15 @@
 ; TODO(jvoung): llvm-objdump doesn't symbolize global symbols well, so we
 ; have [0] == i8v, [2] == i16v, [4] == i32v, [8] == i64v, etc.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @i8v = internal global [1 x i8] zeroinitializer, align 1
 @i16v = internal global [2 x i8] zeroinitializer, align 2
index 2fdb3bc..87c6cea 100644 (file)
@@ -1,16 +1,14 @@
 ; This is a regression test that idiv and div operands are legalized
 ; (they cannot be constants and can only be reg/mem for x86).
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @Sdiv_const8_b(i8 %a) {
 ; CHECK-LABEL: Sdiv_const8_b
index 04f2c7b..3c2cbc5 100644 (file)
@@ -3,7 +3,8 @@
 ; adjustment was incorrectly added to the stack/frame offset for
 ; ebp-based frames.
 
-; RUN: %llvm2ice -Om1 --target=x8632 --verbose none %s \
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --args -Om1 --target=x8632 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
 
index 32d1704..5dad880 100644 (file)
@@ -1,10 +1,8 @@
 ; Trivial test of a trivial function.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @foo() {
 ; CHECK: define void @foo()
index 424fe3a..43d5c46 100644 (file)
@@ -7,18 +7,17 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
index 251a811..e2b0205 100644 (file)
@@ -3,16 +3,14 @@
 ; particular, the top-of-stack must be popped regardless of whether
 ; its value is used.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define float @dummy() {
 entry:
index 295e2a2..7bf7636 100644 (file)
@@ -6,16 +6,14 @@
 ; number in a reasonable number of digits".  See
 ; http://llvm.org/docs/LangRef.html#simple-constants .
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -s -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -s -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
 @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4
index fcb4699..dcc0a58 100644 (file)
@@ -3,7 +3,7 @@
 ; but typically you want to align functions anyway.
 ; Also, we are currently using hlts for non-executable padding.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
 
index 0d791cc..2119511 100644 (file)
@@ -1,9 +1,10 @@
 ; Trivial test of the use of internal versus external global
 ; variables.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
+; TODO(kschimpf) find out why lc2i is needed.
+; RUN: %lc2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @intern_global = internal global [4 x i8] c"\00\00\00\0C", align 4
 @extern_global = external global [4 x i8]
index a0772ee..5155da4 100644 (file)
@@ -1,10 +1,11 @@
 ; Test of global initializers.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s \
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none \
 ; RUN:     | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @PrimitiveInit = internal global [4 x i8] c"\1B\00\00\00", align 4
 ; CHECK: .data
index f6ca8d5..b6e0485 100644 (file)
@@ -1,10 +1,8 @@
 ; Trivial structural test of 64-bit icmp instructions.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @dummy_icmp(i64 %foo, i64 %bar) {
 ; CHECK: define void @dummy_icmp
index 6b7b77f..cd9aadb 100644 (file)
@@ -1,10 +1,9 @@
 ; Simple test of the load instruction.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @load_i64(i32 %addr_arg) {
 entry:
index 8e40d15..92e034b 100644 (file)
@@ -1,16 +1,14 @@
 ; Tests the Subzero "name mangling" when using the "llvm2ice --prefix"
 ; option.  Also does a quick smoke test of -ffunction-sections.
 
-; RUN: %llvm2ice --verbose none -ffunction-sections %s | FileCheck %s
-; TODO: The following line causes this test to fail.
-; RUIN: %llvm2ice --verbose none %s \
+; RUN: %p2i -i %s --args --verbose none -ffunction-sections | FileCheck %s
+; TODO(stichnot): The following line causes this test to fail.
+; RUIN: %p2i -i %s --args --verbose none \
 ; RUIN:     | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj
-; RUN: %llvm2ice --verbose none --prefix Subzero -ffunction-sections %s \
+; RUN: %p2i -i %s --args --verbose none --prefix Subzero -ffunction-sections \
 ; RUN:      | FileCheck --check-prefix=MANGLE %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define internal void @FuncC(i32 %i) {
 entry:
index 3b9886e..59f3fae 100644 (file)
@@ -1,17 +1,16 @@
 ; This tests the optimization of atomic cmpxchg w/ following cmp + branches.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=O2 %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 declare i32 @llvm.nacl.atomic.cmpxchg.i32(i32*, i32, i32, i32, i32)
 
index 581b73c..c7eada3 100644 (file)
@@ -1,7 +1,7 @@
 ; Test that some errors trigger when the usage of NaCl atomic
 ; intrinsics does not match the required ABI.
 
-; RUN: not %llvm2ice --verbose none %s 2>&1 | FileCheck %s
+; RUN: not %p2i -i %s --args --verbose none 2>&1 | FileCheck %s
 
 declare i8 @llvm.nacl.atomic.load.i8(i8*, i32)
 declare i16 @llvm.nacl.atomic.load.i16(i16*, i32)
index 8ca3180..08d9a3b 100644 (file)
@@ -3,7 +3,8 @@
 ; (unlike the non-"all" variety of nacl.atomic.fence, which only
 ; applies to atomic load/stores).
 ;
-; RUN: %llvm2ice -O2 --verbose none %s \
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
 
index 85af606..4d471d4 100644 (file)
@@ -1,20 +1,19 @@
 ; This tests each of the supported NaCl atomic instructions for every
 ; size allowed.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=CHECKO2 %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %lc2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 declare i8 @llvm.nacl.atomic.load.i8(i8*, i32)
 declare i16 @llvm.nacl.atomic.load.i16(i16*, i32)
index 9326be3..217159b 100644 (file)
@@ -4,19 +4,19 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none -sandbox %s \
+; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none -sandbox %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none -sandbox \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
 
 ; Do another run w/ O2 and a different check-prefix (otherwise O2 and Om1
 ; share the same "CHECK" prefix). This separate run helps check that
 ; some code is optimized out.
-; RUN: %llvm2ice -O2 --verbose none -sandbox %s \
+; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=CHECKO2REM %s
 ; Do O2 runs without -sandbox to make sure llvm.nacl.read.tp gets
 ; lowered to __nacl_read_tp instead of gs:[0x0].
 ; We also know that because it's O2, it'll have the O2REM optimizations.
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=CHECKO2UNSANDBOXEDREM %s
 
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 declare i8* @llvm.nacl.read.tp()
 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
index adff9ac..18c8e9f 100644 (file)
@@ -2,14 +2,14 @@
 
 ; Don't use integrated-as because this currently depends on the # variant
 ; assembler comment.
-; RUN: %llvm2ice -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
-; RUN:    -max-nops-per-instruction=1 -integrated-as=false %s \
+; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
+; RUN:    -max-nops-per-instruction=1 -integrated-as=false \
 ; RUN:    | FileCheck %s --check-prefix=PROB50
-; RUN: %llvm2ice -rng-seed=1 -nop-insertion -nop-insertion-percentage=90 \
-; RUN:    -max-nops-per-instruction=1 -integrated-as=false %s \
+; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=90 \
+; RUN:    -max-nops-per-instruction=1 -integrated-as=false \
 ; RUN:    | FileCheck %s --check-prefix=PROB90
-; RUN: %llvm2ice -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
-; RUN:    -max-nops-per-instruction=2 -integrated-as=false %s \
+; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
+; RUN:    -max-nops-per-instruction=2 -integrated-as=false \
 ; RUN:    | FileCheck %s --check-prefix=MAXNOPS2
 
 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
index f0da656..d0a130a 100644 (file)
@@ -2,13 +2,12 @@
 ; it tests that it does the right thing when it tries to enable
 ; compare/branch fusing.
 
-; RUN: %llvm2ice -O2 --verbose none --no-phi-edge-split %s \
+; TODO(kschimpf) Find out why lc2i must be used.
+; RUN: %lc2i -i %s --args -O2 --verbose none --no-phi-edge-split \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define internal i32 @testPhi1(i32 %arg) {
 entry:
index 3abd0ce..2f5d5c2 100644 (file)
@@ -2,7 +2,8 @@
 ; in register allocation.  See
 ; https://code.google.com/p/nativeclient/issues/detail?id=3903 .
 ;
-; RUN: %llvm2ice -O2 --verbose regalloc %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --args -O2 --verbose regalloc
 
 ; ModuleID = 'bugpoint-reduced-simplified.ll'
 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
index 67e7715..eced214 100644 (file)
@@ -1,10 +1,8 @@
 ; Simple test of functions returning one of its arguments.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @func_single_arg(i32 %a) {
 ; CHECK: define i32 @func_single_arg
index 67654af..6f8c9d9 100644 (file)
@@ -1,10 +1,10 @@
 ; This file checks that SimpleCoalescing of local stack slots is not done
 ; when calling a function with the "returns twice" attribute.
 
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
 
 ; Setjmp is a function with the "returns twice" attribute.
 declare i32 @llvm.nacl.setjmp(i8*)
index 7486d94..088724a 100644 (file)
@@ -1,16 +1,14 @@
 ; This checks the correctness of the lowering code for the small
 ; integer variants of sdiv and srem.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @sdiv_i8(i32 %a.i32, i32 %b.i32) {
 entry:
index b643ae6..30ffc71 100644 (file)
@@ -3,16 +3,14 @@
 ; regardless of the optimization level, so there are no special OPTM1
 ; match lines.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @testSelect(i32 %a, i32 %b) {
 entry:
index 260d685..18f13a7 100644 (file)
@@ -1,16 +1,16 @@
 ; This is a test of C-level conversion operations that clang lowers
 ; into pairs of shifts.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --no-local-syms --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --no-local-syms --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --no-local-syms --args --verbose none \
+; RUN:   | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 @i1 = internal global [4 x i8] zeroinitializer, align 4
 @i2 = internal global [4 x i8] zeroinitializer, align 4
index b12f979..1bd00f8 100644 (file)
@@ -1,17 +1,16 @@
 ; This tests a simple loop that sums the elements of an input array.
 ; The O2 check patterns represent the best code currently achieved.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OPTM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; TODO(kschimpf) Find out why lc2i is needed, and fix.
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @simple_loop(i32 %a, i32 %n) {
 entry:
index 789a1de..8b92942 100644 (file)
@@ -1,10 +1,9 @@
 ; Simple test of the store instruction.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; TODO(kschimpf) Find out why lc2i is needed, and fix.
+; RUN: %lc2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define void @store_i64(i32 %addr_arg) {
 entry:
index da922d0..96482df 100644 (file)
@@ -1,11 +1,10 @@
 ; This test is lowered from C code that does some simple aritmetic
 ; with struct members.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %lc2i -i %s --args --verbose inst | FileCheck %s
+; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define internal i32 @compute_important_function(i32 %v1, i32 %v2) {
 entry:
index 710879c..6b9616f 100644 (file)
@@ -2,11 +2,9 @@
 ; same label which also results in phi instructions with multiple
 ; entries for the same incoming edge.
 
-; RUN: %llvm2ice --verbose inst %s | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s -a --verbose inst | FileCheck %s
+; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @testSwitch(i32 %a) {
 entry:
index 6d623cc..b0b654e 100644 (file)
@@ -1,15 +1,13 @@
 ; Tests various aspects of i1 related lowering.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s -a -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 ; Test that xor with true uses immediate 1, not -1.
 define internal i32 @testXorTrue(i32 %arg) {
index 6b66e0a..a188dc8 100644 (file)
@@ -1,21 +1,20 @@
 ; This test checks that undef values are represented as zero.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; TODO(kschimpf) Find out why lc2i is needed.
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %lc2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \
+; RUN: %lc2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define i32 @undef_i32() {
 entry:
index 8b623ab..e6ed5e3 100644 (file)
@@ -1,9 +1,9 @@
 ; Tests that we name unnamed global addresses.
 
-; RUN: %llvm2ice -notranslate -verbose=inst < %s | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
-; RUN: %llvm2ice -notranslate -verbose=inst -default-function-prefix=h \
-; RUN:     -default-global-prefix=g < %s | FileCheck --check-prefix=BAD %s
+; RUN: %p2i -i %s --insts --args -default-function-prefix=h \
+; RUN:     -default-global-prefix=g | FileCheck --check-prefix=BAD %s
 
 @0 = internal global [4 x i8] zeroinitializer, align 4
 
index 8db1bff..b4e2ed5 100644 (file)
@@ -4,19 +4,16 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 --verbose none \
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s -a -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
-
+; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define internal i32 @divide(i32 %num, i32 %den) {
 entry:
index cdefd3c..b878d38 100644 (file)
@@ -1,17 +1,15 @@
 ; This file checks that Subzero generates code in accordance with the
 ; calling convention for vectors.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OPTM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 ; The first five functions test that vectors are moved from their
 ; correct argument location to xmm0.
index 72055f4..29bb57f 100644 (file)
@@ -4,26 +4,24 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 --verbose none\
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s -a -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=SSE41 %s
-; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \
+; RUN: %p2i -i %s -a -Om1 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=SSE41 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) {
 entry:
index c346936..ecdb66b 100644 (file)
@@ -5,19 +5,17 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=OPTM1 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define <16 x i8> @test_bitcast_v16i8_to_v16i8(<16 x i8> %arg) {
 entry:
index 5b0cb1a..1537096 100644 (file)
@@ -5,18 +5,16 @@
 ; doesn't know how to symbolize non-section-local functions.
 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | FileCheck --check-prefix=CALLTARGETS %s
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 ; sext operations
 
index 15ad180..c1172ce 100644 (file)
@@ -1,16 +1,14 @@
 ; This file checks support for comparing vector values with the fcmp
 ; instruction.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s -a -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s -a -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 ; Check that sext elimination occurs when the result of the comparison
 ; instruction is alrady sign extended.  Sign extension to 4 x i32 uses
index 96bb0e7..ea07dac 100644 (file)
@@ -1,16 +1,14 @@
 ; This file checks support for comparing vector values with the icmp
 ; instruction.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 ; Check that sext elimination occurs when the result of the comparison
 ; instruction is alrady sign extended.  Sign extension to 4 x i32 uses
index a5dadde..0b09e6a 100644 (file)
@@ -1,23 +1,22 @@
 ; This checks support for insertelement and extractelement.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; TODO(kschimpf) Figure out why lc2i  is needed.
+; RUN: %lc2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %lc2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \
+; RUN: %lc2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=SSE41 %s
-; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \
+; RUN: %lc2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=SSE41 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 ; insertelement operations
 
index da7270b..3fb4940 100644 (file)
@@ -1,23 +1,21 @@
 ; This file tests support for the select instruction with vector valued inputs.
 
-; RUN: %llvm2ice -O2 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -Om1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
-; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \
+; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=SSE41 %s
-; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \
+; RUN: %p2i -i %s --args -Om1 -mattr=sse4.1 --verbose none \
 ; RUN:   | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
 ; RUN:   | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \
 ; RUN:   | FileCheck --check-prefix=SSE41 %s
-; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
-; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
-; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
-; RUN:                           | FileCheck --check-prefix=DUMP %s
+; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
 
 define <16 x i8> @test_select_v16i8(<16 x i1> %cond, <16 x i8> %arg1, <16 x i8> %arg2) {
 entry:
index 04b203a..fd1dea3 100644 (file)
@@ -1,10 +1,6 @@
 ; Test if we can read alloca instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 ; Show examples where size is defined by a constant.
 
index 25dd0fa..5fde67c 100644 (file)
@@ -1,10 +1,6 @@
 ; Tests if we can read binary operators.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 ; TODO(kschimpf): add i8/i16. Needs bitcasts.
 
index 66e9d5e..46b7ffa 100644 (file)
@@ -1,10 +1,6 @@
 ; Tests if we handle a branch instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define void @SimpleBranch() {
 entry:
index 13221d0..35f73e3 100644 (file)
@@ -1,10 +1,6 @@
 ; Test parsing indirect calls in Subzero.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define internal void @CallIndirectVoid(i32 %f_addr) {
 entry:
index f70c44a..ffe5e04 100644 (file)
@@ -1,10 +1,6 @@
 ; Test handling of call instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define i32 @fib(i32 %n) {
 entry:
index 2346bec..26dc8b7 100644 (file)
@@ -1,9 +1,6 @@
 ; Tests if we can read cast operations.
 
-; RUN: llvm-as < %s | pnacl-freeze \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
 
 ; TODO(kschimpf) Find way to test pointer conversions (since they in general
 ; get removed by pnacl-freeze).
index 40f65db..51eb581 100644 (file)
@@ -1,10 +1,6 @@
 ; Test if we can read compare instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define i1 @IcmpI1(i32 %p1, i32 %p2) {
 entry:
index 85d962a..feb7dcd 100644 (file)
@@ -1,10 +1,6 @@
 ; Test handling of constants in function blocks.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define void @TestIntegers() {
 entry:
index 21d33d5..b938b6c 100644 (file)
@@ -1,10 +1,6 @@
 ; Test use forward type references in function blocks.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcdis -no-records \
 ; RUN:              | FileCheck --check-prefix=DUMP %s
index 2620d90..4bdb4f8 100644 (file)
@@ -1,22 +1,14 @@
 ; Test of global initializers.
 
 ; Check that we generate proper global initializers.
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -verbose inst -build-on-read \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --args -verbose inst | FileCheck %s
 
 ; Check that what we generate is valid assembly
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -verbose none -build-on-read \
-; RUN:                -allow-local-symbol-tables \
+; RUN: %p2i -i %s --args -verbose none \
 ; RUN:     | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj
 
 ; Check that we don't generate errors
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -verbose none -build-on-read \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck --check-prefix=ERRORS %s
+; RUN: %p2i -i %s --args -verbose none | FileCheck --check-prefix=ERRORS %s
 
 @PrimitiveInit = internal global [4 x i8] c"\1B\00\00\00", align 4
 ; CHECK: .data
index c77acf2..9dbe6aa 100644 (file)
@@ -1,11 +1,6 @@
 ; Tests insertelement and extractelement vector instructions.
 
-
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 ; TODO(kschimpf): Change index arguments to valid constant indices once
 ; we can handle constants.
index 117dbbf..7b579d3 100644 (file)
@@ -1,9 +1,6 @@
 ; Test if we can read load instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:              | FileCheck %s
+; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
 
 define i32 @load_i8(i32 %addr) {
 entry:
index 37bb05c..bc9011e 100644 (file)
@@ -1,10 +1,6 @@
 ; Test parsing NaCl atomic instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 declare i8 @llvm.nacl.atomic.load.i8(i8*, i32)
 declare i16 @llvm.nacl.atomic.load.i16(i16*, i32)
index 65d9459..f4a6604 100644 (file)
@@ -1,6 +1,8 @@
 ; Tests that we don't get fooled by a fake NaCl intrinsic.
 
-
+; TODO(kschimpf) Find way to run this through p2i. Note: Can't do this
+;                currently because run-llvm2ice.py raises exception on error,
+;                and output is lost.
 ; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
 ; RUN:              | not %llvm2ice -notranslate -verbose=inst -build-on-read \
 ; RUN:                -allow-pnacl-reader-error-recovery \
index a1ab031..eda03a3 100644 (file)
@@ -1,10 +1,6 @@
 ; This tests parsing NaCl intrinsics not related to atomic operations.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 declare i8* @llvm.nacl.read.tp()
 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
index 0186d4c..3799d4b 100644 (file)
@@ -1,10 +1,6 @@
 ; Test reading phi instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 ; TODO(kschimpf) Add forward reference examples.
 
index 954c80e..8177fa3 100644 (file)
@@ -1,10 +1,6 @@
 ; Tests if we can read select instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define void @Seli1(i32 %p) {
 entry:
index ac1f711..c507175 100644 (file)
@@ -1,9 +1,6 @@
 ; Test if we can read store instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
 
 define void @store_i8(i32 %addr) {
 entry:
index 7edaeda..bb60e55 100644 (file)
@@ -1,10 +1,6 @@
 ; Test switch instructions.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define void @testDefaultSwitch(i32 %a) {
 entry:
index 72c274c..8495ee5 100644 (file)
@@ -1,15 +1,10 @@
 ; Tests that we name unnamed global addresses.
 
-; RUN: llvm-as < %s | pnacl-freeze \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:              | FileCheck %s
-
-; RUN: llvm-as < %s | pnacl-freeze \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -default-function-prefix=h -default-global-prefix=g \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:              | FileCheck --check-prefix=BAD %s
+; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
+
+; RUN: %p2i --no-local-syms -i %s --insts --args \
+; RUN:      -default-function-prefix=h -default-global-prefix=g \
+; RUN:      | FileCheck --check-prefix=BAD %s
 
 ; TODO(kschimpf) Check global variable declarations, once generated.
 
index 954c8f8..4cd2f9d 100644 (file)
@@ -1,10 +1,6 @@
 ; Test parsing unreachable instruction.
 
-; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
-; RUN:              | %llvm2ice -notranslate -verbose=inst -build-on-read \
-; RUN:                -allow-pnacl-reader-error-recovery \
-; RUN:                -allow-local-symbol-tables \
-; RUN:              | FileCheck %s
+; RUN: %p2i -i %s --insts | FileCheck %s
 
 define internal i32 @divide(i32 %num, i32 %den) {
 entry: