Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1118)

Unified Diff: tests_lit/parse_errs/nacl-fake-intrinsic.ll

Issue 735513002: Create local config file for subzero reader tests. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/parse_errs/insertextract-err.ll ('k') | tests_lit/reader_tests/alloca.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/parse_errs/nacl-fake-intrinsic.ll
diff --git a/tests_lit/parse_errs/nacl-fake-intrinsic.ll b/tests_lit/parse_errs/nacl-fake-intrinsic.ll
new file mode 100644
index 0000000000000000000000000000000000000000..eabb1493b10ef9386db8b5db4c257ebd0649c6a8
--- /dev/null
+++ b/tests_lit/parse_errs/nacl-fake-intrinsic.ll
@@ -0,0 +1,32 @@
+; 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: %if --need=allow_dump --command llvm-as < %s \
+; RUN: | %if --need=allow_dump --command pnacl-freeze \
+; RUN -allow-local-symbol-tables \
+; RUN: | %if --need=allow_dump --command not %llvm2ice -notranslate \
+; RUN: -verbose=inst -build-on-read \
+; RUN: -allow-pnacl-reader-error-recovery \
+; RUN: -allow-local-symbol-tables \
+; RUN: | %if --need=allow_dump --command FileCheck %s
+
+; RUN: %if --need=no_dump --command llvm-as < %s \
+; RUN: | %if --need=no_dump --command pnacl-freeze \
+; RUN -allow-local-symbol-tables \
+; RUN: | %if --need=no_dump --command not %llvm2ice -notranslate \
+; RUN: -verbose=inst -build-on-read \
+; RUN: -allow-pnacl-reader-error-recovery \
+; RUN: -allow-local-symbol-tables \
+; RUN: | %if --need=no_dump --command FileCheck %s --check-prefix=MIN
+
+declare i32 @llvm.fake.i32(i32)
+
+define i32 @testFake(i32 %v) {
+ %r = call i32 @llvm.fake.i32(i32 %v)
+ ret i32 %r
+}
+
+; CHECK: Error: ({{.*}}) Invalid PNaCl intrinsic call to llvm.fake.i32
+; MIN: Error: ({{.*}}) Invalid function record: <34 0 3 1>
« no previous file with comments | « tests_lit/parse_errs/insertextract-err.ll ('k') | tests_lit/reader_tests/alloca.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698