[llvm-bugs] [Bug 27610] New: failure to optimize side-effect free assembly
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 2 16:52:32 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27610
Bug ID: 27610
Summary: failure to optimize side-effect free assembly
Product: new-bugs
Version: 3.8
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: superjoe30 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
; ModuleID = 'test.ll'
; Question: why doesn't the following remove the body of derp?
; opt -O3 test.ll -print-module
@argv = internal unnamed_addr global i8** undef
; Function Attrs: nounwind
define void @derp() #0 {
entry:
%0 = tail call i8** asm "lea 0x8(%rsp), $0", "=r"() #0
store i8** %0, i8*** @argv, align 8
ret void
}
attributes #0 = { nounwind }
Here, @argv is internal and never read. Therefore, the inline assembly and
entire body of the function should be optimized away.
Note that the inline assembly is *not* marked `sideeffect`.
--
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/20160502/28b24e0d/attachment.html>
More information about the llvm-bugs
mailing list