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

Unified Diff: tests_lit/llvm2ice_tests/uncond_br.ll

Issue 1724643002: Subzero: Basic unconditional branch for Mips. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: changes suggested by stichnot Created 4 years, 10 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 | « src/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/uncond_br.ll
diff --git a/tests_lit/llvm2ice_tests/uncond_br.ll b/tests_lit/llvm2ice_tests/uncond_br.ll
new file mode 100644
index 0000000000000000000000000000000000000000..03de25386d34313a232943a08319c1478248c15d
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/uncond_br.ll
@@ -0,0 +1,31 @@
+; TODO(rkotler): Stop skipping unimplemented parts (via --skip-unimplemented)
+; once enough infrastructure is in. Also, switch to --filetype=obj
+; when possible.
+; RUN: %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command %p2i --filetype=asm --assemble \
+; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \
+; RUN: -allow-externally-defined-symbols \
+; RUN: | %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command FileCheck --check-prefix MIPS32 %s
+
+define internal void @uncond1(i32 %i) {
+ %1 = alloca i8, i32 4, align 4
+ %.bc = bitcast i8* %1 to i32*
+ store i32 %i, i32* %.bc, align 1
+ br label %target
+; <label>:target
+target:
+ %.bc1 = bitcast i8* %1 to i32*
+ %2 = load i32, i32* %.bc1, align 1
+ %3 = add i32 %2, 1
+ %.bc2 = bitcast i8* %1 to i32*
+ store i32 %3, i32* %.bc2, align 1
+ br label %target
+}
+
+; MIPS32-LABEL: uncond1
+; MIPS32: b 8 <.Luncond1$target>
+; MIPS32: <.Luncond1$target>:
+; MIPS32: li
+; MIPS32: addu
+; MIPS32: b 8 <.Luncond1$target>
« no previous file with comments | « src/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698