diff options
author | Devang Patel <dpatel@apple.com> | 2008-09-02 22:16:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-09-02 22:16:13 +0000 |
commit | 691e52445e2a32d237fc23073fbaf93fb96ce584 (patch) | |
tree | 237618f2ff48d969a6b1c7a13a8f7f01cfc5dd3d /test | |
parent | 36fd941fc029c6ea50ed08d26a2bfe4932b9789c (diff) | |
download | llvm-691e52445e2a32d237fc23073fbaf93fb96ce584.tar.gz llvm-691e52445e2a32d237fc23073fbaf93fb96ce584.tar.bz2 llvm-691e52445e2a32d237fc23073fbaf93fb96ce584.tar.xz |
respect inline=never and inline=always notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/Inline/2008-09-02-AlwaysInline.ll | 10 | ||||
-rw-r--r-- | test/Transforms/Inline/2008-09-02-NoInline.ll | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/Inline/2008-09-02-AlwaysInline.ll b/test/Transforms/Inline/2008-09-02-AlwaysInline.ll new file mode 100644 index 0000000000..188d4c9470 --- /dev/null +++ b/test/Transforms/Inline/2008-09-02-AlwaysInline.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | opt -inline-threshold=0 -inline | llvm-dis | not grep call + +define i32 @fn2() notes(inline=always) { + ret i32 1 +} + +define i32 @fn3() { + %r = call i32 @fn2() + ret i32 %r +} diff --git a/test/Transforms/Inline/2008-09-02-NoInline.ll b/test/Transforms/Inline/2008-09-02-NoInline.ll new file mode 100644 index 0000000000..1d37b08ac7 --- /dev/null +++ b/test/Transforms/Inline/2008-09-02-NoInline.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | opt -inline | llvm-dis | grep call | count 1 + +define i32 @fn2() notes(inline=never) { + ret i32 1 +} + +define i32 @fn3() { + %r = call i32 @fn2() + ret i32 %r +} |