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

Unified Diff: tests_lit/reader_tests/binop-forms.test

Issue 1831043002: Fix Subzero binary instruction to allow optional flags argument. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Replace unit test with .tbc lit test. Created 4 years, 9 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
« src/PNaClTranslator.cpp ('K') | « tests_lit/reader_tests/Inputs/binop-oldform.tbc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/reader_tests/binop-forms.test
diff --git a/tests_lit/reader_tests/binop-forms.test b/tests_lit/reader_tests/binop-forms.test
new file mode 100644
index 0000000000000000000000000000000000000000..1b20704d95b96054a695f98d4c6a259651773ed1
--- /dev/null
+++ b/tests_lit/reader_tests/binop-forms.test
@@ -0,0 +1,19 @@
+; Test if we recognize both the old and the new forms of a binary instruction.
+
+; REQUIRES: no_minimal_build
+
+; Checks that new form of binary add (without flags argument) works.
Jim Stichnoth 2016/03/24 20:53:58 "that the new" ? (similar below)
Karl 2016/03/24 22:54:41 Done.
+; RUN: %pnacl_sz -verbose inst,global_init -notranslate \
+; RUN: -threads=0 -bitcode-as-text %p/Inputs/binop-newform.tbc \
+; RUN: | FileCheck %s
+
+; Checks that old form of binary add (with flags argument) works.
+; RUN: %pnacl_sz -verbose inst,global_init -notranslate \
+; RUN: -threads=0 -bitcode-as-text %p/Inputs/binop-oldform.tbc \
+; RUN: | FileCheck %s
+
+; CHECK: define internal i32 @Function(i32 %__0, i32 %__1) { # Function(i=2:b=1)
Jim Stichnoth 2016/03/24 20:53:59 Remove everything from "#" to the end of the line.
Karl 2016/03/24 22:54:41 Done.
+; CHECK: __0:
+; CHECK: %__2 = add i32 %__0, %__1
+; CHECK: ret i32 %__2
+; CHECK: }
« src/PNaClTranslator.cpp ('K') | « tests_lit/reader_tests/Inputs/binop-oldform.tbc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698