[Mlir-commits] [mlir] [MLIR][XeVM] Add xevm.extf op as the inverse of xevm.truncf (PR #203124)
Artem Kroviakov
llvmlistbot at llvm.org
Thu Jun 11 05:28:13 PDT 2026
================
@@ -377,6 +377,26 @@ LogicalResult TruncfOp::verify() {
return success();
}
+LogicalResult ExtfOp::verify() {
+ Type srcTy = getSrc().getType();
+ Type dstTy = getDst().getType();
+ if (isa<VectorType>(srcTy) && !isa<VectorType>(dstTy))
+ return emitOpError("both src and dst should be vector types or both should "
+ "be scalar types");
+ if (isa<VectorType>(srcTy)) {
+ VectorType srcVecTy = dyn_cast<VectorType>(srcTy);
+ VectorType dstVecTy = dyn_cast<VectorType>(dstTy);
+ if (srcVecTy.getElementTypeBitWidth() >= dstVecTy.getElementTypeBitWidth())
----------------
akroviakov wrote:
Consider using `getElementTypeOrSelf` to reduce code size.
https://github.com/llvm/llvm-project/pull/203124
More information about the Mlir-commits
mailing list