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

--- Comment #1 from Igor Shevlyakov <igor at tachyum dot com> ---
First weird observation with -ftree-dump-all on the snippet above:

in .original:
---
;; Function f1 (null)
;; enabled by -tree-original


{
  return a >= b && a <= b;
}


;; Function f2 (null)
;; enabled by -tree-original


{
  return a >= b && a <= b;
}


;; Function f3 (null)
;; enabled by -tree-original


{
  return a <= b && a >= b;
}
---


.gimple already shows different treatment of the tree which looks the same from
the dump:

int f1 (double a, double b)
{
  int D.11110;

  _1 = a >= b;
  _2 = a <= b;
  _3 = _1 & _2;
  D.11110 = (int) _3;
  return D.11110;
}


int f2 (double a, double b)
{
  int D.11112;
  int iftmp.0;

  if (a >= b) goto <D.11116>; else goto <D.11114>;
  <D.11116>:
  if (a <= b) goto <D.11117>; else goto <D.11114>;
  <D.11117>:
  iftmp.0 = 1;
  goto <D.11115>;
  <D.11114>:
  iftmp.0 = 0;
  <D.11115>:
  D.11112 = iftmp.0;
  return D.11112;
}


int f3 (double a, double b)
{
  int D.11119;
  int iftmp.1;

  if (a <= b) goto <D.11123>; else goto <D.11121>;
  <D.11123>:
  if (a >= b) goto <D.11124>; else goto <D.11121>;
  <D.11124>:
  iftmp.1 = 1;
  goto <D.11122>;
  <D.11121>:
  iftmp.1 = 0;
  <D.11122>:
  D.11119 = iftmp.1;
  return D.11119;
}

Reply via email to