[Mlir-commits] [mlir] [mlir][emitc] Use LLVM_FALLTHROUGH (NFC) (PR #152464)

Mehdi Amini llvmlistbot at llvm.org
Thu Aug 7 08:05:53 PDT 2025


================
@@ -114,11 +115,10 @@ 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:
+      if (!llvm::isa<Float16Type, BFloat16Type>(type))
+        return false;
+      LLVM_FALLTHROUGH;
----------------
joker-eph wrote:

```suggestion
    case 16:
      return llvm::isa<Float16Type, BFloat16Type>(type);
```

Seems like easier for me to read that way.

https://github.com/llvm/llvm-project/pull/152464


More information about the Mlir-commits mailing list