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-steens-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 17 define 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 } 32