Finish making AliasAnalysis aware of the fact that most atomic intrinsics only dereference their arguments, and enhance

BasicAA to make use of this fact when computing ModRef info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2009-02-04 05:16:46 +00:00
parent 39355f9fea
commit fe9388ccb4
3 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep load | count 1
@flag0 = internal global i32 zeroinitializer
@turn = internal global i32 zeroinitializer
define i32 @main() {
%a = load i32* @flag0
%b = tail call i32 @llvm.atomic.swap.i32.p0i32(i32* @turn, i32 1)
%c = load i32* @flag0
ret i32 %c
}
declare i32 @llvm.atomic.swap.i32.p0i32(i32*, i32) nounwind