[PATCH] D53780: Fix bitcast to address space cast for coerced load/stores

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 28 22:56:04 PDT 2018


rjmccall added inline comments.


================
Comment at: lib/CodeGen/CGCall.cpp:1260
       llvm::ConstantInt::get(CGF.IntPtrTy, SrcSize),
       false);
   return CGF.Builder.CreateLoad(Tmp);
----------------
The main reason why `llvm.memcpy` is an overloaded intrinsic is so that you can copy things in arbitrary address spaces.  Please just cast to the appropriate `i8` pointer type in the corresponding address spaces.


Repository:
  rC Clang

https://reviews.llvm.org/D53780





More information about the cfe-commits mailing list