| Index: tests_lit/llvm2ice_tests/reorder-functions.ll
|
| diff --git a/tests_lit/llvm2ice_tests/reorder-functions.ll b/tests_lit/llvm2ice_tests/reorder-functions.ll
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..69b9ee2cc2a1efd89962f4bc34e67297a87c2f1e
|
| --- /dev/null
|
| +++ b/tests_lit/llvm2ice_tests/reorder-functions.ll
|
| @@ -0,0 +1,96 @@
|
| +; This is a smoke test of function reordering.
|
| +
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: | FileCheck %s --check-prefix=DEFAULTWINDOWSIZE
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: | FileCheck %s --check-prefix=DEFAULTWINDOWSIZE
|
| +
|
| +
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: -reorder-functions-window-size=1 \
|
| +; RUN: | FileCheck %s --check-prefix=WINDOWSIZE1
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: -reorder-functions-window-size=1 \
|
| +; RUN: | FileCheck %s --check-prefix=WINDOWSIZE1
|
| +
|
| +
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: -threads=0 \
|
| +; RUN: | FileCheck %s --check-prefix=SEQUENTIAL
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: -threads=0 \
|
| +; RUN: | FileCheck %s --check-prefix=SEQUENTIAL
|
| +
|
| +
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: -reorder-functions-window-size=0xffffffff \
|
| +; RUN: | FileCheck %s --check-prefix=WINDOWSIZEMAX
|
| +; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
|
| +; RUN: -sz-seed=1 -reorder-functions \
|
| +; RUN: -reorder-functions-window-size=0xffffffff \
|
| +; RUN: | FileCheck %s --check-prefix=WINDOWSIZEMAX
|
| +
|
| +define void @first_function() {
|
| +entry:
|
| + ret void
|
| +}
|
| +
|
| +define void @second_function() {
|
| +entry:
|
| + ret void
|
| +}
|
| +
|
| +define void @third_function() {
|
| +entry:
|
| + ret void
|
| +}
|
| +
|
| +define void @fourth_function() {
|
| +entry:
|
| + ret void
|
| +}
|
| +
|
| +define void @fifth_function() {
|
| +entry:
|
| + ret void
|
| +}
|
| +
|
| +define void @sixth_function() {
|
| +entry:
|
| + ret void
|
| +}
|
| +
|
| +; DEFAULTWINDOWSIZE-LABEL: fourth_function
|
| +; DEFAULTWINDOWSIZE-LABEL: first_function
|
| +; DEFAULTWINDOWSIZE-LABEL: third_function
|
| +; DEFAULTWINDOWSIZE-LABEL: sixth_function
|
| +; DEFAULTWINDOWSIZE-LABEL: fifth_function
|
| +; DEFAULTWINDOWSIZE-LABEL: second_function
|
| +
|
| +; WINDOWSIZE1-LABEL: first_function
|
| +; WINDOWSIZE1-LABEL: second_function
|
| +; WINDOWSIZE1-LABEL: third_function
|
| +; WINDOWSIZE1-LABEL: fourth_function
|
| +; WINDOWSIZE1-LABEL: fifth_function
|
| +; WINDOWSIZE1-LABEL: sixth_function
|
| +
|
| +; SEQUENTIAL-LABEL: first_function
|
| +; SEQUENTIAL-LABEL: second_function
|
| +; SEQUENTIAL-LABEL: third_function
|
| +; SEQUENTIAL-LABEL: fourth_function
|
| +; SEQUENTIAL-LABEL: fifth_function
|
| +; SEQUENTIAL-LABEL: sixth_function
|
| +
|
| +; WINDOWSIZEMAX-LABEL: fourth_function
|
| +; WINDOWSIZEMAX-LABEL: first_function
|
| +; WINDOWSIZEMAX-LABEL: third_function
|
| +; WINDOWSIZEMAX-LABEL: sixth_function
|
| +; WINDOWSIZEMAX-LABEL: fifth_function
|
| +; WINDOWSIZEMAX-LABEL: second_function
|
|
|