[PATCH] D46658: [InstCombine] Unify handling of atomic memtransfer with non-atomic memtransfer

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 12:16:15 PDT 2018


dneilson planned changes to this revision.
dneilson added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:130
 
+  if (auto *AMI = dyn_cast<AtomicMemTransferInst>(MI)) {
+    Size *= AMI->getElementSizeInBytes();
----------------
This is wrong. The length of an atomic memtransfer is in bytes, so there is no need to multiply by the element size.


Repository:
  rL LLVM

https://reviews.llvm.org/D46658





More information about the llvm-commits mailing list