• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; This testcase ensures that CFL AA handles trivial cases with storing
2; pointers in pointers appropriately.
3; Derived from:
4; char a, b;
5; char *m = &a, *n = &b;
6; *m;
7; *n;
8
9; RUN: opt < %s -cfl-steens-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
10
11%T = type { i32, [10 x i8] }
12
13; CHECK:     Function: test
14
15define void @test() {
16; CHECK: 15 Total Alias Queries Performed
17; CHECK: 13 no alias responses
18  %M = alloca %T*, align 8
19  %N = alloca %T*, align 8
20  %A = alloca %T, align 8
21  %B = alloca %T, align 8
22
23  store %T* %A, %T** %M
24  store %T* %B, %T** %N
25
26  %AP = load %T*, %T** %M ; PartialAlias with %A
27  %BP = load %T*, %T** %N ; PartialAlias with %B
28
29  ret void
30}
31