================
@@ -781,9 +841,26 @@ class ScalarExprEmitter : public
StmtVisitor<ScalarExprEmitter, mlir::Value> {
return result;
}
+ mlir::Value foldUnaryOp(const UnaryOperator *e) {
+ Expr::EvalResult result;
+ if (!e->EvaluateAsRValue(result, cgf.getContext()))
----------------
andykaylor wrote:
With the folding approach, I'm going to break this up into several pieces,
implementing the folding as a canonicalization first and then inserting
`createOrFold` calls as a follow-up. The first PR is
https://github.com/llvm/llvm-project/pull/174861.
https://github.com/llvm/llvm-project/pull/174670
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits