================
@@ -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);
----------------
krzysz00 wrote:

It's been on The List for a while - haven't gotten to it, especially since 
giving users the sort of aggressive promotion and hoisting I was told they want 
is tricky to do for passes that do general pointer-based reasoning

https://github.com/llvm/llvm-project/pull/203352
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to