177 lines
6.7 KiB
C++
177 lines
6.7 KiB
C++
if (auto op = dyn_cast<::mlir::arm_sve::BfmmlaOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_fmmla,1,{0},{1},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ConvertFromSvboolIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_convert_from_svbool,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ConvertToSvboolIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_convert_to_svbool,1,{},{0},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::DupQLaneIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_dupq_lane,1,{},{0},{1},{StringLiteral("lane")});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::PselIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_psel,1,{},{1},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedAddFIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_fadd,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedAddIIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_add,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedDivFIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_fdiv,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedMulFIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_fmul,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedMulIIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_mul,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedSDivIIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_sdiv,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedSubFIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_fsub,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedSubIIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_sub,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ScalableMaskedUDivIIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_udiv,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::SdotIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_sdot,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::SmmlaIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_smmla,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::UdotIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_udot,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::UmmlaIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_ummla,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::UsmmlaIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_usmmla,1,{0},{},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::WhileLTIntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_whilelt,1,{0},{0},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ZipX2IntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_zip_x2,2,{},{0},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|
|
if (auto op = dyn_cast<::mlir::arm_sve::ZipX4IntrOp>(opInst)) {
|
|
|
|
auto *inst = LLVM::detail::createIntrinsicCall(
|
|
builder, moduleTranslation, &opInst, llvm::Intrinsic::aarch64_sve_zip_x4,4,{},{0},{},{});
|
|
(void) inst;
|
|
moduleTranslation.mapValue(op.getRes()) = inst;
|
|
return success();
|
|
}
|