forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that value handle users see the transformation of an indire…
…ct call to a direct call. This is important for the CallGraph iteration. Patch by Björn Steinbrink! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201822 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; RUN: opt < %s -always-inline -instcombine -S | FileCheck %s | ||
|
||
define internal void @foo(i16*) alwaysinline { | ||
ret void | ||
} | ||
|
||
define void @bar() noinline noreturn { | ||
unreachable | ||
} | ||
|
||
define void @test() { | ||
br i1 false, label %then, label %else | ||
|
||
then: | ||
call void @bar() | ||
unreachable | ||
|
||
else: | ||
; CHECK-NOT: call | ||
call void bitcast (void (i16*)* @foo to void (i8*)*) (i8* null) | ||
ret void | ||
} | ||
|