[llvm-bugs] [Bug 42254] New: @llvm.memcpy not honoring volatile
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 12 06:39:16 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42254
Bug ID: 42254
Summary: @llvm.memcpy not honoring volatile
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: gchatelet at google.com
CC: llvm-bugs at lists.llvm.org
Full discussion here:
http://lists.llvm.org/pipermail/llvm-dev/2019-June/132808.html
The following IR with the volatile parameter set to true
> call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64
7, i1 true)
generates the following asm:
> movl (%rsi), %eax
> movl 3(%rsi), %ecx
> movl %ecx, 3(%rdi)
> movl %eax, (%rdi)
It performs an overlapping read/write which - I believe - is violating the
volatile semantic
Full example here: https://godbolt.org/z/P_rjBT
--
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/20190612/37cb7855/attachment-0001.html>
More information about the llvm-bugs
mailing list