https://bugs.llvm.org/show_bug.cgi?id=46081
Bug ID: 46081
Summary: Consecutive and adjacent calls to memcpy are not
merged.
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: peter.ford...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
In this example memcpy is called 1024 times with consequtive calls to directly
adjacent ememory locations. This could be reduce to a single call to memcpy.
https://godbolt.org/z/taKi4G
Replacing the assignment in the loop with std::copy, here
https://godbolt.org/z/H3DsN9 correctly only calls memcpy once.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs