From 75080ff25dedcd76bee1e08ef5d79609b35db5b1 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 20 Feb 2014 23:00:15 +0000 Subject: Make sure that value handle users see the transformation of an indirect call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit llvm-svn: 201822 --- llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 9e8d1bc3bd6..fe8c1b0baf6 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1212,6 +1212,8 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { if (!Caller->use_empty()) ReplaceInstUsesWith(*Caller, NV); + else if (Caller->hasValueHandle()) + ValueHandleBase::ValueIsRAUWd(Caller, NV); EraseInstFromFunction(*Caller); return true; -- cgit v1.2.3