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

Unified Diff: tests_lit/llvm2ice_tests/contract.ll

Issue 1337113008: Subzero: Don't contract an empty node that branches to itself. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a test 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 | « src/IceCfgNode.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/contract.ll
diff --git a/tests_lit/llvm2ice_tests/contract.ll b/tests_lit/llvm2ice_tests/contract.ll
new file mode 100644
index 0000000000000000000000000000000000000000..59e6491efb291f22994417ced9cd82850203d8d0
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/contract.ll
@@ -0,0 +1,18 @@
+; This tests that an empty node pointing to itself is not contracted.
+; https://code.google.com/p/nativeclient/issues/detail?id=4307
+;
+; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
+; RUN: | FileCheck %s
+
+define void @SimpleBranch() {
+label0:
+ br label %label2
+label1:
+ br label %label1
+label2:
+ br label %label1
+}
+
+; CHECK-LABEL: SimpleBranch
+; CHECK-NEXT: jmp 0 <SimpleBranch>
+; CHECK-NEXT: hlt
« no previous file with comments | « src/IceCfgNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698