This fixes https://llvm.org/bugs/show_bug.cgi?id=24056
Also a bit of refactoring along the way.
Differential D11220
Correct lowering of memmove in NVPTX eliben on Jul 15 2015, 7:59 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions The algorithm looks good. Thanks for working on this! Though I'm wondering if this shouldn't be moved to the CodeGen library. Other targets may be able to benefit from this, like AMDGPU. Comment Actions Thanks for the quick review, Justin. Re AMDGPU, I prefer not to generalize prematurely, because maybe YAGNI :-) AMDGPU folks may or may not need this... They are free to adopt and generalize this if they do need it and I'll be happy to help, of course. Comment Actions You may need this for non-clang frontends, but for clang, you can mark memmove as unsupported in TargetLibraryInfo. This is what we do on AMDGPU for memcpy and memset. Comment Actions Hi, My name is Okwan Kwon, and I have two comments.
Okwan
Comment Actions Thanks, done. Also added test with casts.
There's a TODO in the code now about this. I'll keep it as a TODO for now
|