• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s
2
3; Check that BasicAA falls back to MayAlias (instead of PartialAlias) when none
4; of its little tricks are applicable.
5
6; CHECK: MayAlias: float* %arrayidxA, float* %arrayidxB
7
8define void @fallback_mayalias(float* noalias nocapture %C, i64 %i, i64 %j) local_unnamed_addr {
9entry:
10  %shl = shl i64 %i, 3
11  %mul = shl nsw i64 %j, 4
12  %addA = add nsw i64 %mul, %shl
13  %orB = or i64 %shl, 1
14  %addB = add nsw i64 %mul, %orB
15
16  %arrayidxA = getelementptr inbounds float, float* %C, i64 %addA
17  store float undef, float* %arrayidxA, align 4
18
19  %arrayidxB = getelementptr inbounds float, float* %C, i64 %addB
20  store float undef, float* %arrayidxB, align 4
21
22  ret void
23}
24