[all-commits] [llvm/llvm-project] 3eb9e7: [CIR] Implement switch case simplify (#140649)
Andres-Salamanca via All-commits
all-commits at lists.llvm.org
Thu May 22 10:27:45 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3eb9e7715ea520d56ab0d8009111fd08ab4d4b03
https://github.com/llvm/llvm-project/commit/3eb9e7715ea520d56ab0d8009111fd08ab4d4b03
Author: Andres-Salamanca <andrealebarbaritos at gmail.com>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M clang/include/clang/CIR/MissingFeatures.h
M clang/lib/CIR/CodeGen/CIRGenStmt.cpp
M clang/lib/CIR/Dialect/Transforms/CIRSimplify.cpp
A clang/test/CIR/Transforms/switch-fold.cir
Log Message:
-----------
[CIR] Implement switch case simplify (#140649)
This PR introduces a new **CIR simplify for `switch` cases**, which
folds multiple **cascading `Equal` cases** (that contain only a
`YieldOp`) into a single `CaseOp` of kind `AnyOf`.
This logic is based on the suggestion from this discussion:
https://github.com/llvm/llvm-project/pull/138003#discussion_r2070564458
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list