Chromium Code Reviews| 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.
|