Comment on Branchless Conditionals (2011)parentComments−astrange11yThe neg/sbb/neg operation is 'x = x != 0' or 'x = !!x', I think.You're right that yours should work too, because after the and the value can only have 1 bit set. But it only works for this particular and mask.
Comments
The neg/sbb/neg operation is 'x = x != 0' or 'x = !!x', I think.
You're right that yours should work too, because after the and the value can only have 1 bit set. But it only works for this particular and mask.