source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/CFLAliasAnalysis/multilevel-combine.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 745 bytes
Line 
1; This testcase ensures that CFL AA responds conservatively when we union
2; groups of pointers together through ternary/conditional operations
3; Derived from:
4; void foo(bool c) {
5;   char a, b;
6;   char *m = c ? &a : &b;
7;   *m;
8; }
9;
10
11; RUN: opt < %s -disable-basicaa -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
12
13%T = type { i32, [10 x i8] }
14
15; CHECK:     Function: test
16
17define void @test(i1 %C) {
18; CHECK: 10 Total Alias Queries Performed
19; CHECK: 4 no alias responses
20  %M = alloca %T*, align 8 ; NoAlias with %A, %B, %MS, %AP
21  %A = alloca %T, align 8
22  %B = alloca %T, align 8
23
24  %MS = select i1 %C, %T* %B, %T* %A
25
26  store %T* %MS, %T** %M
27
28  %AP = load %T*, %T** %M ; PartialAlias with %A, %B
29
30  ret void
31}
Note: See TracBrowser for help on using the repository browser.