On 4/26/20 10:59 AM, Jakub Jelinek wrote:
On Sun, Apr 26, 2020 at 09:58:16AM -0400, Nathan Sidwell wrote:

        first_param = (*params)[0];
-       if (fncode == BUILT_IN_NONE
-           || !speculation_safe_value_resolve_params (loc, function, params))
+       if (!speculation_safe_value_resolve_params (loc, function, params))
          return error_mark_node;

first_param isn't used in that conditional, can't you just move its
assinment afterwards?

I think I can't, because speculation_safe_value_resolve_params
can modify the (*params)[0] and if there wasn't a reason to remember
(*params)[0] before the call, why would the patch author add first_param
var at all when it could just use (*params)[0]; it does use (*params)[1]...
So my assumption is that where first_param is used, the code wants the
value before promotions/conversions.

Makes sense, lgtm,

nathan


--
Nathan Sidwell

Reply via email to