No. The comparation for floats is defines in such way, that NaN compared to any number will return false. Anyway, for ints there is another formula:
ZF = !(a ^ b);
That will give true for any possible value of a.
EDIT: on GCC, with any -O flag, the comparation just dissapears to true.