mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 12:33:33 +02:00
36db5853cb
to work out (in a very simplistic way) which function arguments (pointer arguments only) are only dereferenced and so do not escape. Mark such arguments 'nocapture'. llvm-svn: 61525
10 lines
196 B
LLVM
10 lines
196 B
LLVM
; RUN: llvm-as < %s | opt -functionattrs | llvm-dis | not grep read
|
|
; PR2792
|
|
|
|
@g = global i32 0 ; <i32*> [#uses=1]
|
|
|
|
define i32 @f() {
|
|
%t = volatile load i32* @g ; <i32> [#uses=1]
|
|
ret i32 %t
|
|
}
|