You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code performs a sequence of 3 adds and sets w0 if none of the adds overflow.
The generated code calculates !(add1_overflowed | add2_overflowed).
It would be more efficient to generate (add1_didnt_overflow & add2_didnt_overflow)
This code performs a sequence of 3 adds and sets `w0` if none of the adds overflow.
The generated code calculates `!(add1_overflowed | add2_overflowed)`.
It would be more efficient to generate `(add1_didnt_overflow & add2_didnt_overflow)`
This code performs a sequence of 3 adds and sets `w0` if none of the adds overflow.
The generated code calculates `!(add1_overflowed | add2_overflowed)`.
It would be more efficient to generate `(add1_didnt_overflow & add2_didnt_overflow)`
Compiler explorer: https://godbolt.org/z/4avEfzPP1
This code performs a sequence of 3 adds and sets
w0
if none of the adds overflow.The generated code calculates
!(add1_overflowed | add2_overflowed)
.It would be more efficient to generate
(add1_didnt_overflow & add2_didnt_overflow)
generated AArch64 code:
Optimal AArch64 code:
The generated code for x86 is similarly suboptimal:
The code for performing 4 checked additions is even worse:
The text was updated successfully, but these errors were encountered: