//===- CastOps.cpp - MLIR SPIR-V Cast Ops --------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Defines the cast and conversion operations in the SPIR-V dialect. // //===----------------------------------------------------------------------===// #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h" #include "SPIRVOpUtils.h" #include "SPIRVParsingUtils.h" #include "llvm/ADT/TypeSwitch.h" usingnamespacemlir::spirv::AttrNames; namespace mlir::spirv { static LogicalResult verifyCastOp(Operation *op, bool requireSameBitWidth = true, bool skipBitWidthCheck = false) { … } //===----------------------------------------------------------------------===// // spirv.BitcastOp //===----------------------------------------------------------------------===// LogicalResult BitcastOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.ConvertPtrToUOp //===----------------------------------------------------------------------===// LogicalResult ConvertPtrToUOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.ConvertUToPtrOp //===----------------------------------------------------------------------===// LogicalResult ConvertUToPtrOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.PtrCastToGenericOp //===----------------------------------------------------------------------===// LogicalResult PtrCastToGenericOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.GenericCastToPtrOp //===----------------------------------------------------------------------===// LogicalResult GenericCastToPtrOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.GenericCastToPtrExplicitOp //===----------------------------------------------------------------------===// LogicalResult GenericCastToPtrExplicitOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.ConvertFToSOp //===----------------------------------------------------------------------===// LogicalResult ConvertFToSOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.ConvertFToUOp //===----------------------------------------------------------------------===// LogicalResult ConvertFToUOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.ConvertSToFOp //===----------------------------------------------------------------------===// LogicalResult ConvertSToFOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.ConvertUToFOp //===----------------------------------------------------------------------===// LogicalResult ConvertUToFOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.INTELConvertBF16ToFOp //===----------------------------------------------------------------------===// LogicalResult INTELConvertBF16ToFOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.INTELConvertFToBF16Op //===----------------------------------------------------------------------===// LogicalResult INTELConvertFToBF16Op::verify() { … } //===----------------------------------------------------------------------===// // spirv.FConvertOp //===----------------------------------------------------------------------===// LogicalResult spirv::FConvertOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.SConvertOp //===----------------------------------------------------------------------===// LogicalResult spirv::SConvertOp::verify() { … } //===----------------------------------------------------------------------===// // spirv.UConvertOp //===----------------------------------------------------------------------===// LogicalResult spirv::UConvertOp::verify() { … } } // namespace mlir::spirv