https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120400

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #5)
> 
> I must say it's also somewhat odd that the folder chooses the more expensive
> condition to come first - but then if there's no short-circuiting then all
> the ops will be done anyway.

That comes from tree_swap_operands_p:
  /* Put variables last.  */
  if (DECL_P (arg1))
    return false;
  if (DECL_P (arg0))
    return true;

Reply via email to