================
@@ -118,6 +118,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(),
----------------
ayokunle321 wrote:
Thanks for the catch!
I mirrored OG but I was wondering if there was even a point of this function
given `emitBuiltinWithOneOverloadedType<2>(expr, intrinsicName).getValue()`
would give the same result. They both use src0.getType() as the result type.
https://github.com/llvm/llvm-project/pull/197399
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits