diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2016-08-04 04:24:02 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-04 04:24:02 +0000 |
| commit | 909793fa63414e6928cbd56c7f3b1171d55460a7 (patch) | |
| tree | 5b3ae38da7a848a29bbde0990d7a338a1f5c3f39 /llvm/test/Transforms/Inline | |
| parent | bd887581fc9de107f157efaea8702f71ddfed0ea (diff) | |
| download | bcm5719-llvm-909793fa63414e6928cbd56c7f3b1171d55460a7.tar.gz bcm5719-llvm-909793fa63414e6928cbd56c7f3b1171d55460a7.zip | |
Reinstate "[CloneFunction] Don't remove side effecting calls"
This reinstates r277611 + r277614 and reverts r277642. A cast_or_null
should have been a dyn_cast_or_null.
llvm-svn: 277691
Diffstat (limited to 'llvm/test/Transforms/Inline')
| -rw-r--r-- | llvm/test/Transforms/Inline/inline_constprop.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/inline_constprop.ll b/llvm/test/Transforms/Inline/inline_constprop.ll index de23b6157a7..813a71cc24e 100644 --- a/llvm/test/Transforms/Inline/inline_constprop.ll +++ b/llvm/test/Transforms/Inline/inline_constprop.ll @@ -279,3 +279,25 @@ return: %retval.0 = phi i32* [ %b, %if.end3 ], [ %a, %if.then ] ret i32* %retval.0 } + +declare i32 @PR28802.external(i32 returned %p1) + +define internal i32 @PR28802.callee() { +entry: + br label %cont + +cont: + %0 = phi i32 [ 0, %entry ] + %call = call i32 @PR28802.external(i32 %0) + ret i32 %call +} + +define i32 @PR28802() { +entry: + %call = call i32 @PR28802.callee() + ret i32 %call +} + +; CHECK-LABEL: define i32 @PR28802( +; CHECK: call i32 @PR28802.external(i32 0) +; CHECK: ret i32 0 |

