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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
            Summary|[16/17 Regression] wrong    |[16/17 Regression] wrong
                   |code at -O2                 |code at -O2 since r16-4708

--- Comment #6 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Much reduced testcase
```
union u0 {
    unsigned char f1;
    _Bool f2;
};
union u0 g18;
__attribute__((noipa))
void f(int c)
{
  g18.f1 = 45;
  if (c) g18.f2 = 1;
  if (g18.f1 != 45)
    __builtin_abort ();
}
int main()
{
  f(0);
}
```
I am 99.999% sure the bisection will land on r16-4708-g8b0e43d7ec87f5 .

(turning of dom): VRP gives:
Folding statement: _6 = VIEW_CONVERT_EXPR<unsigned char>(cstore_9);
Global Exported: _6 = [irange] unsigned char [0, 1] MASK 0x1 VALUE 0x0
Not folded
Folding statement: if (_6 != 45)
Folding predicate _6 != 45 to 1
Folded into: if (1 != 0)

Reply via email to