• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; This testcase ensures that CFL AA handles assignment in an inclusion-based
2; manner
3
4; RUN: opt < %s -disable-basic-aa -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
6
7; CHECK-LABEL: Function: test_assign
8; CHECK: NoAlias: i64* %a, i64* %b
9; CHECK: NoAlias: i32* %c, i64* %b
10; CHECK: NoAlias: i32* %d, i64* %a
11; CHECK: NoAlias: i32* %c, i32* %d
12; CHECK: MayAlias: i32* %e, i64* %a
13; CHECK: MayAlias: i32* %e, i64* %b
14; CHECK: MayAlias: i32* %c, i32* %e
15; CHECK: MayAlias: i32* %d, i32* %e
16define void @test_assign(i1 %cond) {
17  %a = alloca i64, align 8
18  %b = alloca i64, align 8
19
20  %c = bitcast i64* %a to i32*
21  %d = bitcast i64* %b to i32*
22  %e = select i1 %cond, i32* %c, i32* %d
23  ret void
24}