Fix sp manipulation in CanonicalizeNaN