2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -basicaa -gvn -S | 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
|
|
|
}
|