-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support indirect calls with ptr attributes
- Loading branch information
1 parent
3bb4af9
commit 834ce61
Showing
5 changed files
with
45 additions
and
10 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
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
23 changes: 23 additions & 0 deletions
23
tests/alive-tv/calls/indirect-call-ptr-attrbiutes.srctgt.ll
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 @@ | ||
define i8 @src(ptr nocapture %0) { | ||
%2 = call i8 %0(ptr null) | ||
ret i8 %2 | ||
} | ||
|
||
define i8 @tgt(ptr nocapture %0) { | ||
%2 = icmp eq ptr %0, @_Z3fooPi | ||
br i1 %2, label %then, label %else | ||
|
||
else: | ||
%3 = call i8 %0(ptr null) | ||
br label %ret | ||
|
||
then: | ||
%4 = call i8 @_Z3fooPi(ptr null) | ||
br label %ret | ||
|
||
ret: | ||
%5 = phi i8 [ %3, %else ], [ %4, %then ] | ||
ret i8 %5 | ||
} | ||
|
||
declare i8 @_Z3fooPi(ptr) |