2009-03-17 02:28:27 +08:00
|
|
|
; RUN: llvm-as < %s | opt -basicaa -gvn | llvm-dis | grep load
|
2009-03-15 03:40:09 +08:00
|
|
|
|
|
|
|
declare noalias i32* @noalias()
|
|
|
|
|
2009-03-17 02:28:27 +08:00
|
|
|
define i32 @test(i32 %x) {
|
2009-03-15 03:40:09 +08:00
|
|
|
%a = call i32* @noalias()
|
2009-03-17 02:28:27 +08:00
|
|
|
store i32 1, i32* %a
|
2009-03-15 03:40:09 +08:00
|
|
|
%b = getelementptr i32* %a, i32 %x
|
2009-03-17 02:28:27 +08:00
|
|
|
store i32 2, i32* %b
|
|
|
|
|
|
|
|
%c = load i32* %a
|
|
|
|
ret i32 %c
|
2009-03-15 03:40:09 +08:00
|
|
|
}
|