Improve ARM64 vector creation
[oota-llvm.git] / test / Other / optimization-remarks-inline.ll
1 ; RUN: opt < %s -inline -pass-remarks='inline' -S 2>&1 | FileCheck %s
2 ; RUN: opt < %s -inline -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
3 ; RUN: opt < %s -inline -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
4 ; RUN: opt < %s -inline -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
5 ; RUN: opt < %s -inline -S 2>&1 | FileCheck --check-prefix=REMARKS %s
6 ; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s
7
8 define i32 @foo(i32 %x, i32 %y) #0 {
9 entry:
10   %x.addr = alloca i32, align 4
11   %y.addr = alloca i32, align 4
12   store i32 %x, i32* %x.addr, align 4
13   store i32 %y, i32* %y.addr, align 4
14   %0 = load i32* %x.addr, align 4
15   %1 = load i32* %y.addr, align 4
16   %add = add nsw i32 %0, %1
17   ret i32 %add
18 }
19
20 define i32 @bar(i32 %j) #0 {
21 entry:
22   %j.addr = alloca i32, align 4
23   store i32 %j, i32* %j.addr, align 4
24   %0 = load i32* %j.addr, align 4
25   %1 = load i32* %j.addr, align 4
26   %sub = sub nsw i32 %1, 2
27   %call = call i32 @foo(i32 %0, i32 %sub)
28 ; CHECK: foo inlined into bar
29 ; REMARKS-NOT: foo inlined into bar
30   ret i32 %call
31 }
32
33 ; BAD-REGEXP: Invalid regular expression '(' in -pass-remarks: