blob: 639cb0a2f82c9d5febc276df5584729ed03d666d [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; This testcase consists of alias relations which should be completely
2; resolvable by basicaa, but require analysis of getelementptr constant exprs.
3
Tanya Lattnera695f012008-02-14 06:56:27 +00004; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases -disable-output \
5; RUN: |& not grep May:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattnera695f012008-02-14 06:56:27 +00007%T = type { i32, [10 x i8] }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008
Tanya Lattnera695f012008-02-14 06:56:27 +00009@G = external global %T
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010
Tanya Lattnera695f012008-02-14 06:56:27 +000011define void @test() {
12 %D = getelementptr %T* @G, i64 0, i32 0
13 %E = getelementptr %T* @G, i64 0, i32 1, i64 5
14 %F = getelementptr i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
15 %X = getelementptr [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016
17 ret void
18}