[Mlir-commits] [mlir] 49c371b - Add llvm_unreachable after fully covered switch to silence some warnings from GCC (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Aug 25 16:09:23 PDT 2020


Author: Mehdi Amini
Date: 2020-08-25T23:09:11Z
New Revision: 49c371b319ee11f2fc7e47dfe73c0ef8136d0305

URL: https://github.com/llvm/llvm-project/commit/49c371b319ee11f2fc7e47dfe73c0ef8136d0305
DIFF: https://github.com/llvm/llvm-project/commit/49c371b319ee11f2fc7e47dfe73c0ef8136d0305.diff

LOG: Add llvm_unreachable after fully covered switch to silence some warnings from GCC (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Vector/VectorOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Vector/VectorOps.cpp b/mlir/lib/Dialect/Vector/VectorOps.cpp
index a0fd7a187f13..d3eebc38d5de 100644
--- a/mlir/lib/Dialect/Vector/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/VectorOps.cpp
@@ -1949,6 +1949,7 @@ class MaskedLoadFolder final : public OpRewritePattern<MaskedLoadOp> {
     case MaskFormat::Unknown:
       return failure();
     }
+    llvm_unreachable("Unexpected 1DMaskFormat on MaskedLoad");
   }
 };
 } // namespace
@@ -1994,6 +1995,7 @@ class MaskedStoreFolder final : public OpRewritePattern<MaskedStoreOp> {
     case MaskFormat::Unknown:
       return failure();
     }
+    llvm_unreachable("Unexpected 1DMaskFormat on MaskedStore");
   }
 };
 } // namespace
@@ -2042,6 +2044,7 @@ class GatherFolder final : public OpRewritePattern<GatherOp> {
     case MaskFormat::Unknown:
       return failure();
     }
+    llvm_unreachable("Unexpected 1DMaskFormat on GatherFolder");
   }
 };
 } // namespace
@@ -2085,6 +2088,7 @@ class ScatterFolder final : public OpRewritePattern<ScatterOp> {
     case MaskFormat::Unknown:
       return failure();
     }
+    llvm_unreachable("Unexpected 1DMaskFormat on ScatterFolder");
   }
 };
 } // namespace
@@ -2134,6 +2138,7 @@ class ExpandLoadFolder final : public OpRewritePattern<ExpandLoadOp> {
     case MaskFormat::Unknown:
       return failure();
     }
+    llvm_unreachable("Unexpected 1DMaskFormat on ExpandLoadFolder");
   }
 };
 } // namespace
@@ -2180,6 +2185,7 @@ class CompressStoreFolder final : public OpRewritePattern<CompressStoreOp> {
     case MaskFormat::Unknown:
       return failure();
     }
+    llvm_unreachable("Unexpected 1DMaskFormat on CompressStoreFolder");
   }
 };
 } // namespace


        


More information about the Mlir-commits mailing list