The generic rule is X | (Y ^ Z) == (X | Y) ^ Z if X & (Y ^ Z) == 0 (because then it is just X ^ Y ^ Z -- dunno if you want to go that far -- but that sure would be nice). Segher (everything should be canonicalized to (n)ands (and maybe xors)... or == doubt == wrong).