Skip to content

Commit 3fbb553

Browse files
authored
[mlir][emitc] Simplify emitc::isSupportedFloatType (NFC) (#152464)
1 parent de2bac3 commit 3fbb553

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mlir/lib/Dialect/EmitC/IR/EmitC.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,8 @@ bool mlir::emitc::isIntegerIndexOrOpaqueType(Type type) {
114114
bool mlir::emitc::isSupportedFloatType(Type type) {
115115
if (auto floatType = llvm::dyn_cast<FloatType>(type)) {
116116
switch (floatType.getWidth()) {
117-
case 16: {
118-
if (llvm::isa<Float16Type, BFloat16Type>(type))
119-
return true;
120-
return false;
121-
}
117+
case 16:
118+
return llvm::isa<Float16Type, BFloat16Type>(type);
122119
case 32:
123120
case 64:
124121
return true;

0 commit comments

Comments
 (0)