[clang] Implement CIR switch case simplify with appropriate tests (PR #140649)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 17:14:36 PDT 2025
================
@@ -186,7 +288,7 @@ void CIRSimplifyPass::runOnOperation() {
// Collect operations to apply patterns.
llvm::SmallVector<Operation *, 16> ops;
getOperation()->walk([&](Operation *op) {
- if (isa<TernaryOp, SelectOp>(op))
+ if (isa<TernaryOp, SelectOp, SwitchOp>(op))
----------------
bcardosolopes wrote:
Can you double check if the test passes without issues if `-DMLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS=ON` is used while building clang? We currently having incubator issues with this and probably best to make sure we don't introduce them here if possible.
https://github.com/llvm/llvm-project/pull/140649
More information about the cfe-commits
mailing list