llvm-6502/test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll
Nick Lewycky 02ff308aa1 Extend the 'noalias' attribute to function return values. This is intended to
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).

No changes to the bitcode reader/writer, asm printer or verifier were needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24 03:41:24 +00:00

13 lines
275 B
LLVM

; RUN: llvm-as < %s | opt -aa-eval |& grep {1 no alias response}
declare noalias i32* @_Znwj(i32 %x) nounwind
define i32 @foo() {
%A = call i32* @_Znwj(i32 4)
%B = call i32* @_Znwj(i32 4)
store i32 1, i32* %A
store i32 2, i32* %B
%C = load i32* %A
ret i32 %C
}