1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[BasicAA] Remove assert in AA evaluator

As reported in https://reviews.llvm.org/D91383#2401825, this
assert breaks external -aa-eval tests. We'll have to fix this
case before re-enabling it.
This commit is contained in:
Nikita Popov 2020-11-18 19:06:32 +01:00
parent be3f7186d3
commit 4d1322fde5
2 changed files with 23 additions and 8 deletions

View File

@ -170,14 +170,6 @@ void AAEvaluator::runInternal(Function &F, AAResults &AA) {
++MustAliasCount;
break;
}
// We assume that alias(I1, I2) == alias(I2, I1) and only print one
// order. Make sure this assumption actually holds.
// TODO: We should probably assert this in AA itself under
// EXPENSIVE_CHECKS. This would need some more thorough verification that
// all AA queries are symmetric first.
assert(AR == AA.alias(*I2, I2Size, *I1, I1Size) &&
"AA query not symmetric");
}
}

View File

@ -188,4 +188,27 @@ bb5: ; preds = %bb3, %bb4
ret i16 0
}
; TODO: Currently yields an asymmetric result.
; CHECK-LABEL: Function: symmetry
; CHECK: MayAlias: i32* %p, i32* %p.base
; CHECK: MayAlias: i32* %p.base, i32* %p.next
; CHECK: NoAlias: i32* %p, i32* %p.next
; CHECK: MayAlias: i32* %p.base, i32* %result
; CHECK: NoAlias: i32* %p, i32* %result
; CHECK: MustAlias: i32* %p.next, i32* %result
define i32* @symmetry(i32* %p.base, i1 %c) {
entry:
br label %loop
loop:
%p = phi i32* [ %p.base, %entry ], [ %p.next, %loop ]
%p.next = getelementptr inbounds i32, i32* %p, i32 1
br i1 %c, label %loop, label %exit
exit:
%result = phi i32* [ %p.next, %loop ]
ret i32* %result
}
declare i16 @call(i32)