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

Unified Diff: tests_lit/parse_errs/insertelt-wrong-type.test

Issue 1357273004: Check that element type correct in vector insert element. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 years, 3 months 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/Inputs/insertelt-wrong-type.tbc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/parse_errs/insertelt-wrong-type.test
diff --git a/tests_lit/parse_errs/insertelt-wrong-type.test b/tests_lit/parse_errs/insertelt-wrong-type.test
new file mode 100644
index 0000000000000000000000000000000000000000..326ec34f441bc1d2524ca08e41b5d52f9c269eed
--- /dev/null
+++ b/tests_lit/parse_errs/insertelt-wrong-type.test
@@ -0,0 +1,32 @@
+; Tests that we check if the element being inserted into a vector is of the
+; right type.
+
+; REQUIRES: no_minimal_build
+
+; RUN: not %pnacl_sz -bitcode-as-text \
+; RUN: %p/Inputs/insertelt-wrong-type.tbc \
+; RUN: -bitcode-format=pnacl -notranslate -build-on-read 2>&1 \
+; RUN: | FileCheck %s
+
+; CHECK: Insertelement: Element type i8 doesn't match vector type <16 x i1>
+
+; RUN: pnacl-bcfuzz -bitcode-as-text \
+; RUN: %p/Inputs/insertelt-wrong-type.tbc -output - \
+; RUN: | not pnacl-bcdis -no-records | FileCheck -check-prefix=ASM %s
+
+; ASM: function void @f0(<16 x i1> %p0) { // BlockID = 12
+; ASM: blocks 1;
+; ASM: constants { // BlockID = 11
+; ASM: i1:
+; ASM: %c0 = i1 1;
+; ASM: i8:
+; ASM: %c1 = i8 1;
+; ASM: i32:
+; ASM: %c2 = i32 0;
+; ASM: }
+; ASM: %b0:
+; ASM: %v0 = add i8 %c1, %c1;
+; ASM: %v1 = insertelement <16 x i1> %p0, i8 %c1, i32 %c2;
+; ASM: Error(128:0): insertelement: Illegal element type i8. Expected: i1
+; ASM: ret void;
+; ASM: }
« no previous file with comments | « tests_lit/parse_errs/Inputs/insertelt-wrong-type.tbc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698