summaryrefslogtreecommitdiff
path: root/test/Transforms/Inline/inline-optsize.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/Inline/inline-optsize.ll')
-rw-r--r--test/Transforms/Inline/inline-optsize.ll13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/Transforms/Inline/inline-optsize.ll b/test/Transforms/Inline/inline-optsize.ll
index b01a1f657f31d..7e62245fd3f02 100644
--- a/test/Transforms/Inline/inline-optsize.ll
+++ b/test/Transforms/Inline/inline-optsize.ll
@@ -1,5 +1,6 @@
; RUN: opt -S -Oz < %s | FileCheck %s -check-prefix=OZ
; RUN: opt -S -O2 < %s | FileCheck %s -check-prefix=O2
+; RUN: opt -S -Os < %s | FileCheck %s -check-prefix=OS
; The inline threshold for a function with the optsize attribute is currently
; the same as the global inline threshold for -Os. Check that the optsize
@@ -24,10 +25,20 @@ define i32 @inner() {
ret i32 %x5
}
-; @inner() should be inlined for -O2 but not for -Oz.
+; @inner() should be inlined for -O2 and -Os but not for -Oz.
; OZ: call
; O2-NOT: call
+; OS-NOT: call
define i32 @outer() optsize {
%r = call i32 @inner()
ret i32 %r
}
+
+; @inner() should not be inlined for -O2, -Os and -Oz.
+; OZ: call
+; O2: call
+; OS: call
+define i32 @outer2() minsize {
+ %r = call i32 @inner()
+ ret i32 %r
+}