Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Attributor] Do not set 'returned' attribute for arguments that canno…
…t be bitcasted to function result Reviewers: jdoerfert, sstefan1, uenoku Reviewed By: jdoerfert Subscribers: hiraditya, uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78828
- Loading branch information
1 parent
f31db76
commit 67aed14
Showing
2 changed files
with
16 additions
and
4 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,9 @@ | ||
; RUN: opt -attributor -S %s | FileCheck %s | ||
; RUN: opt -passes=attributor -S %s | FileCheck %s | ||
; | ||
; CHECK: define i32 addrspace(1)* @foo(i32 addrspace(4)* nofree readnone %arg) | ||
define i32 addrspace(1)* @foo(i32 addrspace(4)* %arg) { | ||
entry: | ||
%0 = addrspacecast i32 addrspace(4)* %arg to i32 addrspace(1)* | ||
ret i32 addrspace(1)* %0 | ||
} |