From 909793fa63414e6928cbd56c7f3b1171d55460a7 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 4 Aug 2016 04:24:02 +0000 Subject: 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 --- llvm/test/Transforms/Inline/inline_constprop.ll | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'llvm/test/Transforms/Inline') 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 -- cgit v1.2.3