================
@@ -91,6 +91,16 @@ static mlir::Value emitLogbBuiltin(CIRGenFunction &cgf,
const CallExpr *e,
return res;
}
+// Emit an intrinsic that has 1 float or double operand, and 1 integer.
+static mlir::Value emitFPIntBuiltin(CIRGenFunction &cgf, const CallExpr *e,
+ llvm::StringRef intrinsicName) {
+ mlir::Value src0 = cgf.emitScalarExpr(e->getArg(0));
+ mlir::Value src1 = cgf.emitScalarExpr(e->getArg(1));
+ return cgf.getBuilder().emitIntrinsicCallOp(
+ cgf.getLoc(e->getExprLoc()), "amdgcn.ds.swizzle", src0.getType(),
----------------
shiltian wrote:
Is using a string instead of IID the right approach in CIR?
https://github.com/llvm/llvm-project/pull/197399
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits