1 ; RUN: opt -S -Oz < %s | FileCheck %s -check-prefix=OZ
2 ; RUN: opt -S -O2 < %s | FileCheck %s -check-prefix=O2
3 ; RUN: opt -S -Os < %s | FileCheck %s -check-prefix=OS
5 ; The inline threshold for a function with the optsize attribute is currently
6 ; the same as the global inline threshold for -Os. Check that the optsize
7 ; function attribute doesn't alter the function-specific inline threshold if the
8 ; global inline threshold is lower (as for -Oz).
12 ; This function should be larger than the inline threshold for -Oz (25), but
13 ; smaller than the inline threshold for optsize (75).
16 %a1 = load volatile i32, i32* @a
17 %x1 = add i32 %a1, %a1
18 %a2 = load volatile i32, i32* @a
19 %x2 = add i32 %x1, %a2
20 %a3 = load volatile i32, i32* @a
21 %x3 = add i32 %x2, %a3
22 %a4 = load volatile i32, i32* @a
23 %x4 = add i32 %x3, %a4
24 %a5 = load volatile i32, i32* @a
25 %x5 = add i32 %x3, %a5
29 ; @inner() should be inlined for -O2 and -Os but not for -Oz.
33 define i32 @outer() optsize {
34 %r = call i32 @inner()
38 ; @inner() should not be inlined for -O2, -Os and -Oz.
42 define i32 @outer2() minsize {
43 %r = call i32 @inner()
47 declare void @extern()