Mercurial > hg > CbC > CbC_llvm
diff test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll @ 0:95c75e76d11b LLVM3.4
LLVM 3.4
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Dec 2013 13:56:28 +0900 |
parents | |
children | 60c9769439b8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll Thu Dec 12 13:56:28 2013 +0900 @@ -0,0 +1,20 @@ +; This testcase consists of alias relations which should be completely +; resolvable by basicaa, but require analysis of getelementptr constant exprs. + +; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s + +%T = type { i32, [10 x i8] } + +@G = external global %T + +; CHECK: Function: test +; CHECK-NOT: May: + +define void @test() { + %D = getelementptr %T* @G, i64 0, i32 0 + %E = getelementptr %T* @G, i64 0, i32 1, i64 5 + %F = getelementptr i32* getelementptr (%T* @G, i64 0, i32 0), i64 0 + %X = getelementptr [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5 + + ret void +}