[Mlir-commits] [mlir] [MLIR][XeVM] Add xevm.extf op as the inverse of xevm.truncf (PR #203124)
Sang Ik Lee
llvmlistbot at llvm.org
Fri Jun 12 12:02:50 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())
----------------
silee2 wrote:
Done — collapsed the scalar/vector branches into a single `getElementTypeOrSelf(srcTy).getIntOrFloatBitWidth() >= getElementTypeOrSelf(dstTy).getIntOrFloatBitWidth()` check.
https://github.com/llvm/llvm-project/pull/203124
More information about the Mlir-commits
mailing list