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

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: Modify test for x8632 and 64 to check with and without local-cse 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
« src/IceCfg.cpp ('K') | « 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..c744f036019b7769b98303b893aa132c3872df25
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/local-cse.ll
@@ -0,0 +1,41 @@
+;Tests local-cse on x8632 and x8664
+; RUN: %p2i -i %s --filetype=asm --target x8632 --args -threads=0 \
Jim Stichnoth 2016/05/23 16:52:57 1. Instead of "--filetype=asm", use "--filetype=ob
manasijm 2016/05/23 23:13:30 Done.
+; RUN: -O2 -enable-experimental | FileCheck --check-prefix X8632EXP %s
+
+; RUN: %p2i -i %s --filetype=asm --target x8632 --args -threads=0 \
+; RUN: -O2 | FileCheck --check-prefix X8632 %s
+
+; RUN: %p2i -i %s --filetype=asm --target x8664 --args -threads=0 \
+; RUN: -O2 -enable-experimental | FileCheck --check-prefix X8664EXP %s
+
+; RUN: %p2i -i %s --filetype=asm --target x8664 --args -threads=0 \
+; RUN: -O2 | FileCheck --check-prefix X8664 %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: addl
Jim Stichnoth 2016/05/23 16:52:57 There is a lot of repetition of fixed patterns in
manasijm 2016/05/23 23:13:30 Done.
+; X8632: addl
+; X8632: addl
+; X8632: ret
+
+; X8632EXP: addl
+; X8632EXP: addl
+; X8632EXP-NOT: addl
+; X8632EXP: ret
+
+; X8664: addl
+; X8664: addl
+; X8664: addl
+; X8664: ret
+
+; X8664EXP: addl
+; X8664EXP: addl
+; X8664EXP-NOT: addl
+; X8664EXP: ret
+
Jim Stichnoth 2016/05/23 16:52:57 Remove trailing whitespace (i.e. blank line at the
manasijm 2016/05/23 23:13:30 Done.
« src/IceCfg.cpp ('K') | « src/IceTimerTree.def ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698