<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - BasicAA/SCEVAA claim PartialAlias when there is no overlap"
href="https://llvm.org/bugs/show_bug.cgi?id=27478">27478</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>BasicAA/SCEVAA claim PartialAlias when there is no overlap
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Global Analyses
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>twoh@fb.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>BasicAA/SCEVAA claims PartialAlias when there is no overlap at all. Ideally
they should claim NoAlias, but if they can't it should be MayAlias not
PartialAlias.
*** Test code
%"type" = type { [10 x i32], i64 }
define void @test(%"type"* %base) {
entry:
%int = getelementptr inbounds %"type", %"type"* %base, i64 0, i32 1
%arr_first = getelementptr inbounds %"type", %"type"* %base, i64 0, i32 0,
i64 0
%arr_last = getelementptr inbounds %"type", %"type"* %base, i64 0, i32 0,
i64 9
%arr_oob = getelementptr inbounds %"type", %"type"* %base, i64 0, i32 0,
i64 10 ; out-of-bound access
br label %loop
loop:
%index = phi i64 [ 0, %entry ], [ %inc, %loop ]
%arr_index = getelementptr inbounds %"type", %"type"* %base, i64 0, i32 0,
i64 %index
%inc = add i64 %index, 1
%cmp = icmp ult i64 %inc, 10
br i1 %cmp, label %loop, label %exit
exit:
ret void
}
*** output from "opt < test.ll –basicaa -aa–eval -print-all-alias-modref-info
-disable-output" (same output for -scev-aa as well)
PartialAlias: %type* %base, i64* %int
MustAlias: %type* %base, i32* %arr_first
NoAlias: i32* %arr_first, i64* %int
PartialAlias: %type* %base, i32* %arr_last
NoAlias: i32* %arr_last, i64* %int
NoAlias: i32* %arr_first, i32* %arr_last
PartialAlias: %type* %base, i32* %arr_oob
MustAlias: i32* %arr_oob, i64* %int
NoAlias: i32* %arr_first, i32* %arr_oob
NoAlias: i32* %arr_last, i32* %arr_oob
PartialAlias: %type* %base, i32* %arr_index
PartialAlias: i32* %arr_index, i64* %int
PartialAlias: i32* %arr_first, i32* %arr_index
PartialAlias: i32* %arr_index, i32* %arr_last
PartialAlias: i32* %arr_index, i32* %arr_oob
===== Alias Analysis Evaluator Report =====
15 Total Alias Queries Performed
5 no alias responses (33.3%)
0 may alias responses (0.0%)
8 partial alias responses (53.3%)
2 must alias responses (13.3%)
Alias Analysis Evaluator Pointer Alias Summary: 33%/0%/53%/13%
Alias Analysis Mod/Ref Evaluator Summary: no mod/ref!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>