mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
New testcase: check that the inliner constant folds instructions on the
fly if it can. llvm-svn: 28515
This commit is contained in:
parent
d8bd52bfd2
commit
2a1f1bb6d5
15
test/Regression/Transforms/Inline/inline_constprop.ll
Normal file
15
test/Regression/Transforms/Inline/inline_constprop.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: llvm-as < %s | opt -inline -disable-output &&
|
||||
; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep callee &&
|
||||
; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep div
|
||||
|
||||
implementation
|
||||
|
||||
internal int %callee(int %A, int %B) {
|
||||
%C = div int %A, %B
|
||||
ret int %C
|
||||
}
|
||||
|
||||
int %test() {
|
||||
%X = call int %callee(int 10, int 3)
|
||||
ret int %X
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user