1; This testcase ensures that CFL AA answers queries soundly when callee tries 2; to return an unknown pointer 3 4; RUN: opt < %s -aa-pipeline=cfl-steens-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s 5 6@g = external global i32 7define i32* @return_unknown_callee(i32* %arg1, i32* %arg2) { 8 ret i32* @g 9} 10; CHECK-LABEL: Function: test_return_unknown 11; CHECK: NoAlias: i32* %a, i32* %b 12; CHECK: MayAlias: i32* %c, i32* %x 13; CHECK: NoAlias: i32* %a, i32* %c 14; CHECK: NoAlias: i32* %b, i32* %c 15define void @test_return_unknown(i32* %x) { 16 %a = alloca i32, align 4 17 %b = alloca i32, align 4 18 19 load i32, i32* %x 20 load i32, i32* %a 21 load i32, i32* %b 22 %c = call i32* @return_unknown_callee(i32* %a, i32* %b) 23 load i32, i32* %c 24 25 ret void 26} 27 28@g2 = external global i32* 29define i32** @return_unknown_callee2() { 30 ret i32** @g2 31} 32; CHECK-LABEL: Function: test_return_unknown2 33; CHECK: MayAlias: i32** %a, i32* %x 34; CHECK: MayAlias: i32* %b, i32* %x 35; CHECK: MayAlias: i32** %a, i32* %b 36define void @test_return_unknown2(i32* %x) { 37 load i32, i32* %x 38 %a = call i32** @return_unknown_callee2() 39 %b = load i32*, i32** %a 40 load i32, i32* %b 41 42 ret void 43} 44