[Mlir-commits] [mlir] [mlir][emitc] Add 'emitc.switch' op to the dialect (PR #102331)
Andrey Timonin
llvmlistbot at llvm.org
Thu Aug 8 04:27:36 PDT 2024
================
@@ -131,6 +131,12 @@ bool mlir::emitc::isPointerWideType(Type type) {
type);
}
+bool mlir::emitc::isSwitchOperandType(Type type) {
+ auto intType = llvm::dyn_cast<IntegerType>(type);
----------------
EtoAndruwa wrote:
> The emitc IR is mostly a syntactic representation of the C++ code. So I'd think that emitc.switch should allow all integral types as condition.
I agree with you. We will support all [types](https://en.cppreference.com/w/cpp/language/switch) for the condition. I will upload the respective patch.
https://github.com/llvm/llvm-project/pull/102331
More information about the Mlir-commits
mailing list