4 Commits

Author SHA1 Message Date
Henrich Lauko
4820b183a8
[CIR] Simplify ConstantOp accesses and its getDefiningOp (#151216)
- Replaces  dyn_cast<cir::ConstantOp>(v.getDefiningOp()) and similar with v.getDefiningOp<cir::ConstantOp>()
- Adds `getValueAttr` method to ConstantOp
2025-08-01 21:04:54 +02:00
Amr Hesham
9ee55e7173
[CIR] Implement folder for VecSplatOp (#143771)
This change adds a folder for the VecSplatOp

Issue https://github.com/llvm/llvm-project/issues/136487
2025-06-19 09:01:51 +02:00
Andres-Salamanca
3eb9e7715e
[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
2025-05-22 10:27:23 -07:00
Morris Hafner
2eb6545b3e
[CIR] Add cir-simplify pass (#138317)
This patch adds the cir-simplify pass for SelectOp and TernaryOp. It
also adds the SelectOp folder and adds the constant materializer for the
CIR dialect.
2025-05-07 18:50:39 +02:00