1 ; RUN: opt < %s -disable-basicaa -cfl-steens-aa -aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s
2 ; When merging MustAlias and PartialAlias, merge to PartialAlias
6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
8 ; FIXME: This could be PartialAlias but CFLSteensAA can't currently prove it
9 ; CHECK: MayAlias: i16* %bigbase0, i8* %phi
10 define i8 @test0(i1 %x) {
12 %base = alloca i8, align 4
13 %baseplusone = getelementptr i8, i8* %base, i64 1
14 br i1 %x, label %red, label %green
18 %phi = phi i8* [ %baseplusone, %red ], [ %base, %entry ]
21 %bigbase0 = bitcast i8* %base to i16*
22 store i16 -1, i16* %bigbase0
24 %loaded = load i8, i8* %phi
28 ; FIXME: This could be PartialAlias but CFLSteensAA can't currently prove it
29 ; CHECK: MayAlias: i16* %bigbase1, i8* %sel
30 define i8 @test1(i1 %x) {
32 %base = alloca i8, align 4
33 %baseplusone = getelementptr i8, i8* %base, i64 1
34 %sel = select i1 %x, i8* %baseplusone, i8* %base
37 %bigbase1 = bitcast i8* %base to i16*
38 store i16 -1, i16* %bigbase1
40 %loaded = load i8, i8* %sel
44 ; Incoming pointer arguments should not be PartialAlias because we do not know their initial state
45 ; even if they are nocapture
46 ; CHECK: MayAlias: double* %A, double* %Index
47 define void @testr2(double* nocapture readonly %A, double* nocapture readonly %Index) {
48 %arrayidx22 = getelementptr inbounds double, double* %Index, i64 2
49 %1 = load double, double* %arrayidx22
50 %arrayidx25 = getelementptr inbounds double, double* %A, i64 2
51 %2 = load double, double* %arrayidx25
53 %mul26 = fmul double %3, %2