1 ; This testcase ensures that CFL AA answers queries soundly when callee tries
2 ; to return an unknown pointer
4 ; RUN: opt < %s -disable-basicaa -cfl-anders-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
5 ; RUN: opt < %s -aa-pipeline=cfl-anders-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
7 @g = external global i32
8 define i32* @return_unknown_callee(i32* %arg1, i32* %arg2) {
11 ; CHECK-LABEL: Function: test_return_unknown
12 ; CHECK: NoAlias: i32* %a, i32* %b
13 ; CHECK: MayAlias: i32* %c, i32* %x
14 ; CHECK: NoAlias: i32* %a, i32* %c
15 ; CHECK: NoAlias: i32* %b, i32* %c
16 define void @test_return_unknown(i32* %x) {
17 %a = alloca i32, align 4
18 %b = alloca i32, align 4
20 %c = call i32* @return_unknown_callee(i32* %a, i32* %b)
25 @g2 = external global i32*
26 define i32** @return_unknown_callee2() {
29 ; CHECK-LABEL: Function: test_return_unknown2
30 ; CHECK: MayAlias: i32* %x, i32** %a
31 ; CHECK: MayAlias: i32* %b, i32* %x
32 ; CHECK: MayAlias: i32* %b, i32** %a
33 define void @test_return_unknown2(i32* %x) {
34 %a = call i32** @return_unknown_callee2()
35 %b = load i32*, i32** %a