[llvm-dev] @llvm.memcpy not honoring volatile?
Guillaume Chatelet via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 5 06:36:20 PDT 2019
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
Is this a bug or am I misunderstanding volatile in this context?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190605/cd914fa6/attachment-0001.html>
More information about the llvm-dev
mailing list