[Mlir-commits] [mlir] 3fbb553 - [mlir][emitc] Simplify emitc::isSupportedFloatType (NFC) (#152464)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Aug 7 08:53:08 PDT 2025
Author: Andrey Timonin
Date: 2025-08-07T17:53:05+02:00
New Revision: 3fbb553f7d31329212b658cca5b9eb5dae4e91b2
URL: https://github.com/llvm/llvm-project/commit/3fbb553f7d31329212b658cca5b9eb5dae4e91b2
DIFF: https://github.com/llvm/llvm-project/commit/3fbb553f7d31329212b658cca5b9eb5dae4e91b2.diff
LOG: [mlir][emitc] Simplify emitc::isSupportedFloatType (NFC) (#152464)
Added:
Modified:
mlir/lib/Dialect/EmitC/IR/EmitC.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/EmitC/IR/EmitC.cpp b/mlir/lib/Dialect/EmitC/IR/EmitC.cpp
index e6a3154721faa..e79da9268693a 100644
--- a/mlir/lib/Dialect/EmitC/IR/EmitC.cpp
+++ b/mlir/lib/Dialect/EmitC/IR/EmitC.cpp
@@ -114,11 +114,8 @@ bool mlir::emitc::isIntegerIndexOrOpaqueType(Type type) {
bool mlir::emitc::isSupportedFloatType(Type type) {
if (auto floatType = llvm::dyn_cast<FloatType>(type)) {
switch (floatType.getWidth()) {
- case 16: {
- if (llvm::isa<Float16Type, BFloat16Type>(type))
- return true;
- return false;
- }
+ case 16:
+ return llvm::isa<Float16Type, BFloat16Type>(type);
case 32:
case 64:
return true;
More information about the Mlir-commits
mailing list