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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |middle-end

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note clang falls over when the order is swapped of the addition is swapped:
```
#include <stdint.h>

uint32_t f(uint32_t i2, uint32_t aa)
{
    return ((i2 >> 17) + (aa >> 17)) << 17;
}

uint32_t f2(uint32_t i2, uint32_t aa)
{
    return ((aa & -(1 << 17)) + i2) & -(1 << 17);
}

bool f3(uint32_t i2, uint32_t aa)
{
    return f(i2, aa) == f2(i2, aa);
}
```

Reply via email to