[llvm-bugs] [Bug 25422] New: Incorrect liveness in DeadStoreElimination
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 5 13:17:03 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25422
Bug ID: 25422
Summary: Incorrect liveness in DeadStoreElimination
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: dan433584 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
In this code:
declare void @foo()
@g = external global i8
define void @f() {
store i8 1, i8* @g
call void @foo() readnone
store i8 0, i8* @g
ret void
}
Dead-store elimination eliminates the first store, however this is incorrect if
the call to @foo can unwind, such that callers of @f can observe the value of
@g after the first store and before the second, even if @foo itself can't.
MemoryDependenceAnalysis currently says that the second store here has a direct
local dependence on the first store. There's a sense in which that is a correct
answer, but DeadStoreElimination inteprets this answer to mean that the first
store is dead. It's not immediately obvious which of these two should be fixed.
This is a reduced form of the issue reported in Rust here:
https://github.com/rust-lang/rust/issues/29485
--
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/20151105/9c58c8a4/attachment.html>
More information about the llvm-bugs
mailing list