[Bug middle-end/111574] [14 Regression] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"

2023-09-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111574

--- Comment #6 from Andrew Pinski  ---
What is happening is:
```
  if (_1 != 0)
goto ; [INV]
  else
goto ; [INV]

   :
  _28 = (uint8_t) _1;
  // predicted unlikely by early return (on trees) predictor.
  goto ; [INV]

   :
  _7 = func_34 (0);

   :
  # _17 = PHI <_28(6), 0(7)>
```

Is being converted into:
```
  if (_1 != 0)
goto ; [INV]
  else
goto ; [INV]

   :
  // predicted unlikely by early return (on trees) predictor.
  goto ; [INV]

   :
  _7 = func_34 (0);

   :
  # _new = PHI <_1(6), 0(7)>
  _17 = (uint8_t) _new;
```

And then incorrectly into:
```
  _7 = func_34 (0);
  _17 = (uint8_t) _1;
```
Removing the if statement.
The same way as the other bug is being incorrectly handled too.

[Bug middle-end/111574] [14 Regression] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"

2023-09-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111574

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Andrew Pinski  ---
Dup of bug 111469. That is the patch which fixes PR 111469 will fix this one
too.

*** This bug has been marked as a duplicate of bug 111469 ***

[Bug middle-end/111574] [14 Regression] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"

2023-09-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111574

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org

--- Comment #4 from Andrew Pinski  ---
This is another phiopt issue ...