This makes sure to not consider calls to builtin decls with
mismatching arguments as inexpensive.
2022-04-13 Richard Biener <rguenther@suse.de>
* tree-scalar-evolution.cc (expression_expensive_p):
Never consider mismatched calls as cheap.
break;
return true;
}
+ break;
+
default:
+ if (cfn == CFN_LAST
+ || !is_inexpensive_builtin (get_callee_fndecl (expr)))
+ return true;
break;
}
- if (!is_inexpensive_builtin (get_callee_fndecl (expr)))
- return true;
FOR_EACH_CALL_EXPR_ARG (arg, iter, expr)
if (expression_expensive_p (arg, cache, op_cost))
return true;