diff options
Diffstat (limited to 'test/Transforms/IPConstantProp')
-rw-r--r-- | test/Transforms/IPConstantProp/recursion.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/IPConstantProp/recursion.ll b/test/Transforms/IPConstantProp/recursion.ll new file mode 100644 index 0000000000..ac36eabcd3 --- /dev/null +++ b/test/Transforms/IPConstantProp/recursion.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -ipconstprop -deadargelim | llvm-dis | not grep %X + +implementation + +internal int %foo(int %X) { + %Y = call int %foo( int %X ) + %Z = add int %Y, 1 + ret int %Z +} + +void %bar() { + call int %foo( int 17 ) ; <int>:0 [#uses=0] + ret void +} |