[llvm-bugs] [Bug 44913] New: Missing DSE opportunity when second store is done in inline assembly
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 14 08:12:57 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44913
Bug ID: 44913
Summary: Missing DSE opportunity when second store is done in
inline assembly
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: glider at google.com
CC: florian_hahn at apple.com, llvm-bugs at lists.llvm.org,
llvm-bugzilla at jfbastien.com, vitalybuka at google.com
As reported by Daniel Colascione, Clang fails to remove the dead store in the
following program:
extern int foo(int* bar);
int bar()
{
int x = 5;
asm("nop\n\tnop\n\tnop" : "=m" (x));
return foo(&x);
}
see https://gcc.godbolt.org/z/c2fMNH (bad, clang) vs.
https://gcc.godbolt.org/z/a_biz5 (good, GCC).
This probably prevents it from deleting redundant initialization before
copy_from_user() in the Linux kernel.
--
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/20200214/137b2c55/attachment.html>
More information about the llvm-bugs
mailing list