[clang] [CIR] Implement simple folding for unary operations (PR #174882)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 8 11:04:06 PST 2026


https://github.com/xlauko approved this pull request.

lgtm % adaptor suggestion

Sidenote, it might be nicer in the future to refactor unary/binary operations to specific operations for each kind i.e. `AddOp`, NotOp` etc. then one does not need to do this ind of type switches everywhere and implement AddOp::fold etc.

https://github.com/llvm/llvm-project/pull/174882


More information about the cfe-commits mailing list