diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-04-17 02:01:10 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-04-17 02:01:10 +0000 |
commit | 37ae72b508d7f8974c143f017c01f6c27dc6805c (patch) | |
tree | 0b978a00f95219f1cf10ce1d9cfecbb9d2a8c5ff /llvm/test/Transforms/InstCombine/fprintf-1.ll | |
parent | a077279184e39f7ec25e1a491e47bf51c25355d5 (diff) | |
download | bcm5719-llvm-37ae72b508d7f8974c143f017c01f6c27dc6805c.tar.gz bcm5719-llvm-37ae72b508d7f8974c143f017c01f6c27dc6805c.zip |
Do not optimise fprintf() calls if its return value is used.
Differential Revision: http://llvm-reviews.chandlerc.com/D620
llvm-svn: 179661
Diffstat (limited to 'llvm/test/Transforms/InstCombine/fprintf-1.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/fprintf-1.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/fprintf-1.ll b/llvm/test/Transforms/InstCombine/fprintf-1.ll index 39d86b4588c..e1dc191bd70 100644 --- a/llvm/test/Transforms/InstCombine/fprintf-1.ll +++ b/llvm/test/Transforms/InstCombine/fprintf-1.ll @@ -78,3 +78,12 @@ define void @test_no_simplify2(%FILE* %fp, double %d) { ret void ; CHECK-NEXT: ret void } + +define i32 @test_no_simplify3(%FILE* %fp) { +; CHECK: @test_no_simplify3 + %fmt = getelementptr [13 x i8]* @hello_world, i32 0, i32 0 + %1 = call i32 (%FILE*, i8*, ...)* @fprintf(%FILE* %fp, i8* %fmt) +; CHECK-NEXT: call i32 (%FILE*, i8*, ...)* @fprintf(%FILE* %fp, i8* getelementptr inbounds ([13 x i8]* @hello_world, i32 0, i32 0)) + ret i32 %1 +; CHECK-NEXT: ret i32 %1 +} |