https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113982
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |middle-end
Last reconfirmed| |2024-02-18
Severity|normal |enhancement
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
aarch64 looks fine (ok there is an one extra mov):
```
add_wide_1(unsigned long long, unsigned long long):
adds x2, x0, x1
mov x0, x2
cset x1, cs
ret
add_wide_2(unsigned long long, unsigned long long):
adds x0, x0, x1
cset x1, cs
ret
```
So we have:
```
_1 = (__int128 unsigned) x_6(D);
_2 = (__int128 unsigned) y_7(D);
r_8 = _1 + _2;
_3 = x_6(D) + y_7(D);
D.2566.sum = _3;
_4 = r_8 >> 64;
_5 = (bool) _4;
D.2566.carry = _5;
```
So if we should convert _5 into:
_t = .ADD_OVERFLOW (x_3(D), y_4(D));
_t2 = IMAGPART_EXPR <_t>;
_5 = (bool) _t2;
And then later on see that r_8 is REALPART_EXPR<_t>;
It would just work ...