There is no hard guarantee that this loop will be constant time because there is nothing that stops the compiler from rewriting it to a loop that bails out when the xor produces a non-zero value.