From 1e198ca72ea3b2c0522aa06e263b9ec71679e244 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Fri, 5 Apr 2019 16:16:24 -0700 Subject: [PATCH] fix(library/compiler/csimp): missing optimization opportunity --- src/library/compiler/csimp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library/compiler/csimp.cpp b/src/library/compiler/csimp.cpp index ccb9dc68e9..98d489869a 100644 --- a/src/library/compiler/csimp.cpp +++ b/src/library/compiler/csimp.cpp @@ -1580,13 +1580,13 @@ class csimp_fn { } else if (is_constant(fn)) { unsigned nargs = get_app_num_args(e); if (nargs == 1) { - expr a1 = find(app_arg(e)); + expr a1 = find(visit_arg(app_arg(e))); if (optional r = fold_un_op(m_before_erasure, fn, a1)) { return *r; } } else if (nargs == 2) { - expr a1 = find(app_arg(app_fn(e))); - expr a2 = find(app_arg(e)); + expr a1 = find(visit_arg(app_arg(app_fn(e)))); + expr a2 = find(visit_arg(app_arg(e))); if (optional r = fold_bin_op(m_before_erasure, fn, a1, a2)) { return *r; }