This revision was automatically updated to reflect the committed changes.
Closed by commit rC346413: Fix bitcast to address space cast for coerced
load/stores (authored by yaxunl, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53780?vs=172673&id=173179#toc
Repository:
rC
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM.
Repository:
rC Clang
https://reviews.llvm.org/D53780
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
david-salinas updated this revision to Diff 172673.
david-salinas added a comment.
fix missing ;
Repository:
rC Clang
https://reviews.llvm.org/D53780
Files:
lib/CodeGen/CGCall.cpp
test/CodeGenCXX/address-space-cast-coerce.cpp
Index: test/CodeGenCXX/address-space-cast-coerce.cpp
===
david-salinas updated this revision to Diff 172671.
david-salinas added a comment.
using CreateElementBitCast instead
Repository:
rC Clang
https://reviews.llvm.org/D53780
Files:
lib/CodeGen/CGCall.cpp
test/CodeGenCXX/address-space-cast-coerce.cpp
Index: test/CodeGenCXX/address-space-ca
rjmccall added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:1257
+ Address Casted = CGF.Builder.CreateBitCast(Tmp,
CGF.Int8Ty->getPointerTo(Tmp.getAddressSpace()));
+ Address SrcCasted = CGF.Builder.CreateBitCast(Src,
CGF.Int8Ty->getPointerTo(Src.getAddressSpace()));
david-salinas updated this revision to Diff 172261.
david-salinas added a comment.
As per rjmccall's comments, changed the call to
CreatePointerBitCastOrAddrSpaceCast back to a call to CreateBitCast, but now
we're casting to the int8* with the address space of the target.
https://reviews.llvm.
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
co
david-salinas updated this revision to Diff 171367.
david-salinas added a comment.
remove __attribute__((cpu)) __attribute__((hc)) from test
Repository:
rC Clang
https://reviews.llvm.org/D53780
Files:
lib/CodeGen/CGCall.cpp
test/CodeGenCXX/address-space-cast-coerce.cpp
Index: test/Code
david-salinas created this revision.
david-salinas added reviewers: yaxunl, scchan.
Herald added a subscriber: cfe-commits.
Coerced load/stores through memory do not take into account potential address
space differences when it creates its bitcasts.
Repository:
rC Clang
https://reviews.llvm