summaryrefslogtreecommitdiff
path: root/test/Transforms/Inline/inline_constprop.ll
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /test/Transforms/Inline/inline_constprop.ll
Diffstat (limited to 'test/Transforms/Inline/inline_constprop.ll')
-rw-r--r--test/Transforms/Inline/inline_constprop.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/Inline/inline_constprop.ll b/test/Transforms/Inline/inline_constprop.ll
new file mode 100644
index 0000000000000..4744c862335b1
--- /dev/null
+++ b/test/Transforms/Inline/inline_constprop.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep callee
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep div
+
+
+define internal i32 @callee(i32 %A, i32 %B) {
+ %C = sdiv i32 %A, %B ; <i32> [#uses=1]
+ ret i32 %C
+}
+
+define i32 @test() {
+ %X = call i32 @callee( i32 10, i32 3 ) ; <i32> [#uses=1]
+ ret i32 %X
+}
+