[PATCH] D33240: [Atomics] Rename and change prototype for atomic memcpy intrinsic

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 06:29:49 PDT 2017


dneilson added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:114
+  // Only expand if there are elements to copy.
+  if (NumElements > 0) {
+    // Don't unfold into illegal integers
----------------
reames wrote:
> Where did this check come from and why is it needed?  It looks like an attempt to handle a length which isn't an even interval of element size, but the verifier should reject that?
Just me being extra cautious. The verifier checks for the case where constant length is not a multiple of element size, and the zero length case is handled elsewhere. However, I'm not sure that the verifier runs after every single pass. So, I figure there's no harm in handling the corner case.


https://reviews.llvm.org/D33240





More information about the llvm-commits mailing list