I think this is a logical extension of the current checks in computeKnownBitsFromAssume(). Ie, it has negligible cost for the added functionality. But let me know if we need to re-think the whole approach.
This is the reason I didn't have the canonical xor-form of 'not' in the test case for D28337 - it doesn't work without this change.
I don't think you want to use the uint64_t constructor here., you probably want to use clearAllBits and setAllBits on the two APInts as needed.