Re:Unsigned comparisons in AVX2/SSE: a quick note
by moonchild on Friday August 26, 2022 @03:55PM
(#32612013)
> if you need to compare for a < b as opposed to a <= b, you gonna need couple more instructions
Depends on what you are doing--you may not need to spend any extra ops at all. For instance, if you are blending then you can compute a >= b and commute the blend arguments. If you are branching, then you pick the complementary flag to branch on. Etc.
Depends on what you are doing--you may not need to spend any extra ops at all. For instance, if you are blending then you can compute a >= b and commute the blend arguments. If you are branching, then you pick the complementary flag to branch on. Etc.