If I would forget about performance I would add a check here to make sure that sz is some power of 2. It would be disastrous for the performance if this is not true. A size of 1025 would lead to a mask with one bit set and therefore only one bucket.
Am I guessing right that you left out these checks for performance reasons because you know you'll call this method always with powers of 2?