[PATCH] D12313: Introduce __builtin_nontemporal_store and __builtin_nontemporal_load.
Michael Zolotukhin via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 27 22:56:46 PDT 2015
mzolotukhin added a comment.
Hi Richard, Hal, and others,
I updated the patch according to review remarks - now we support vector and boolean types too! Could you please take a look?
Thanks,
Michael
================
Comment at: lib/CodeGen/CGBuiltin.cpp:128-129
@@ +127,4 @@
+ Val = CGF.EmitToMemory(Val, E->getArg(0)->getType());
+ Value *BC = CGF.Builder.CreateBitCast(
+ Address, llvm::PointerType::getUnqual(Val->getType()), "cast");
+ StoreInst *SI = CGF.Builder.CreateStore(Val, BC);
----------------
Thanks! Fixed.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:149
@@ +148,3 @@
+ return LI;
+}
+
----------------
In this case we already have with `i8` value - AFAIU, we get `i8*` pointer from `EmitScalarExpr(E->getArg(0))`. Do I miss something here?
================
Comment at: lib/Sema/SemaChecking.cpp:2236-2242
@@ +2235,9 @@
+
+ // Ensure that we have the proper number of arguments.
+ if (checkArgCount(*this, TheCall, numArgs))
+ return ExprError();
+
+ // Inspect the last argument of the nontemporal builtin. This should always
+ // be a pointer type, from which we imply the type of the memory access.
+ // Because it is a pointer type, we don't have to worry about any implicit
+ // casts here.
----------------
Good idea, thanks!
http://reviews.llvm.org/D12313
More information about the cfe-commits
mailing list