xlauko wrote: I don't see real use of not allowing this by default, as this is essentially identity folding, not really optimization? And applying folds is way cheaper then rewrite patterns later.
Though yes, I agree we should have discussion where is the borderline, for instance `UnaryOp::fold` is doing more simplification/rewrite than this from my point of view. https://github.com/llvm/llvm-project/pull/147592 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits