xref: /llvm-project/llvm/test/CodeGen/MLRegAlloc/empty-log.ll (revision 65b40f273f09a53f61a13ac6f4bb65ec4ac63d6e)
1; REQUIRES: have_tflite
2; REQUIRES: x86_64-linux
3;
4; Check that we can log more than 1 function.
5;
6; RUN: llc -mtriple=x86_64-linux-unknown -regalloc=greedy -regalloc-enable-advisor=development \
7; RUN:   -regalloc-training-log=%t1 < %s
8; RUN: FileCheck --input-file %t1 %s
9
10; RUN: llc -mtriple=x86_64-linux-unknown -regalloc=greedy -regalloc-enable-priority-advisor=development \
11; RUN:   -regalloc-priority-training-log=%t2 < %s
12; RUN: FileCheck --input-file %t2 %s
13
14declare void @f();
15
16define void @f1(i64 %lhs, i64 %rhs, i64* %addr) {
17  ret void
18}
19
20define void @f2(i64 %lhs, i64 %rhs, i64* %addr) {
21  %sum = add i64 %lhs, %rhs
22  call void @f();
23  store i64 %sum, i64* %addr
24  ret void
25}
26
27define void @f3(i64 %lhs, i64 %rhs, i64* %addr) {
28  ret void
29}
30
31; CHECK-NOT:  {"context":"f1"}
32; CHECK:      {"context":"f2"}
33; CHECK-NOT:  {"context":"f3"}
34