From dceeed39b14cc9fc4748e82a67caab2e1d9caafa Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Mon, 15 Jul 2013 08:23:06 -0700 Subject: Run the LLVM IR verifier just once in pnacl-llc. By default, using the path inherited from llc, the verifier is run twice. We only need it to run once right after reading the bitcode in and before the ABI verifier runs. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3553 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/18920004 --- test/NaCl/PNaClLLC/lit.local.cfg | 1 + test/NaCl/PNaClLLC/test-runs-verify.ll | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/NaCl/PNaClLLC/lit.local.cfg create mode 100644 test/NaCl/PNaClLLC/test-runs-verify.ll (limited to 'test') diff --git a/test/NaCl/PNaClLLC/lit.local.cfg b/test/NaCl/PNaClLLC/lit.local.cfg new file mode 100644 index 0000000000..c6106e4746 --- /dev/null +++ b/test/NaCl/PNaClLLC/lit.local.cfg @@ -0,0 +1 @@ +config.suffixes = ['.ll'] diff --git a/test/NaCl/PNaClLLC/test-runs-verify.ll b/test/NaCl/PNaClLLC/test-runs-verify.ll new file mode 100644 index 0000000000..9e7c9d32a5 --- /dev/null +++ b/test/NaCl/PNaClLLC/test-runs-verify.ll @@ -0,0 +1,13 @@ +; RUN: not pnacl-llc -mtriple=i386-unknown-nacl -filetype=asm %s -o - 2>&1 | FileCheck %s + +; Test that the Verifier pass is running in pnacl-llc. + +define i32 @f1(i32 %x) { + %y = add i32 %z, 1 + %z = add i32 %x, 1 + ret i32 %y +; CHECK: Instruction does not dominate all uses! +; CHECK-NEXT: %z = add i32 %x, 1 +; CHECK-NEXT: %y = add i32 %z, 1 +} + -- cgit v1.2.3-70-g09d2