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

Unified Diff: tests_lit/llvm2ice_tests/local-cse.ll

Issue 1997443002: Subzero: Initial implementation of BB Local CSE (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Final touches Created 4 years, 7 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/IceTimerTree.def ('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/local-cse.ll
diff --git a/tests_lit/llvm2ice_tests/local-cse.ll b/tests_lit/llvm2ice_tests/local-cse.ll
new file mode 100644
index 0000000000000000000000000000000000000000..fae1816922f0a11692dbde5d5224cf045cbaedb3
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/local-cse.ll
@@ -0,0 +1,36 @@
+; Tests local-cse on x8632 and x8664
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --target x8632 --args \
+; RUN: -O2 -enable-experimental | FileCheck --check-prefix=X8632 \
+; RUN: --check-prefix=X8632EXP %s
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --target x8632 --args \
+; RUN: -O2 | FileCheck --check-prefix=X8632 --check-prefix X8632NOEXP %s
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --target x8664 --args \
+; RUN: -O2 -enable-experimental | FileCheck --check-prefix=X8664 \
+; RUN: --check-prefix=X8664EXP %s
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --target x8664 --args \
+; RUN: -O2 | FileCheck --check-prefix=X8664 --check-prefix X8664NOEXP %s
+
+
+define internal i32 @local_cse_test(i32 %a, i32 %b) {
+entry:
+ %add1 = add i32 %b, %a
+ %add2 = add i32 %b, %a
+ %add3 = add i32 %add1, %add2
+ ret i32 %add3
+}
+
+; X8632: add
+; X8632: add
+; X8632NOEXP: add
+; X8632EXP-NOT: add
+; X8632: ret
+
+; X8664: add
+; X8664: add
+; X8664NOEXP: add
+; X8664EXP-NOT: add
+; X8664: ret
« no previous file with comments | « src/IceTimerTree.def ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698