-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SelectionDAG][FIX] Allow "returned" arguments to be bit-casted
Summary: An argument that is return by a function but bit-casted before can still be annotated as "returned". Make sure we do not crash for this case. Reviewers: sunfish, stephenwlin, niravd, arsenm Subscribers: wdng, hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59917 llvm-svn: 362546
- Loading branch information
Johannes Doerfert
committed
Jun 4, 2019
1 parent
40107ce
commit 6b432dc
Showing
2 changed files
with
17 additions
and
2 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,12 @@ | ||
; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s | ||
|
||
; Test that the "returned" attribute "works" even if there is a bitcast between | ||
; the argument and return value. | ||
|
||
declare double* @bar(i8* returned) | ||
|
||
define double* @foo(i8*) { | ||
%r = tail call double* @bar(i8* %0) | ||
; CHECK: jmp bar | ||
ret double* %r | ||
} |