================
@@ -31,6 +31,22 @@ using namespace llvm;
namespace {
+static Value *emitAMDGPUSBufferLoadBuiltin(CodeGenFunction &CGF,
+ const CallExpr *E) {
+ llvm::Type *RetTy = CGF.ConvertType(E->getType());
+ Function *F = CGF.CGM.getIntrinsic(Intrinsic::amdgcn_s_buffer_load, RetTy);
+
+ Value *RsrcPtr = CGF.EmitScalarExpr(E->getArg(0));
+ llvm::Type *I128Ty = llvm::IntegerType::get(CGF.getLLVMContext(), 128);
+ llvm::Type *RsrcVecTy =
+ llvm::FixedVectorType::get(CGF.Builder.getInt32Ty(), 4);
+ Value *RsrcInt = CGF.Builder.CreatePtrToInt(RsrcPtr, I128Ty);
----------------
arsenm wrote:
Do we really not have pointer versions of this intrinsic already?
https://github.com/llvm/llvm-project/pull/203352
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits