[LLVMbugs] [Bug 15811] New: DependenceAnalysis is not access size aware.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 21 20:03:39 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15811
Bug ID: 15811
Summary: DependenceAnalysis is not access size aware.
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: etherzhhb at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10398
--> http://llvm.org/bugs/attachment.cgi?id=10398&action=edit
The patch to add the fail case.
Consider the following function:
define i64 @alias(i32* nocapture %A) nounwind uwtable {
entry:
%arrayidx = getelementptr inbounds i32* %A, i64 1
store i32 2, i32* %arrayidx, align 4
%0 = bitcast i32* %A to i64*
%1 = load i64* %0, align 8
ret i64 %1
}
Ignoring size of the memory location accessed in
store i32 2, i32* %arrayidx, align 4
and
%1 = load i64* %0, align 8,
The addresses pointed by %arrayidx and %0 doesn't alias each other, and hence
DependenceAnalysis claims there is not dependencies from the store to the load,
and gives the following output:
da analyze - none!
da analyze - none!
da analyze - none!
However, the above result is incorrect (at least for x86), there should be a
dependency from from the store to the load, because the memory location written
by the store overlap with the memory location read by the load.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130422/81ed1f52/attachment.html>
More information about the llvm-bugs
mailing list