x86 require no matter when one of the operands is a register, so this is impossible.
Suggestion: since it is two immediates and if your code isn't self-modifying, you can base on the result and hand-optimise the remaining code and replace operations that reads the flags with ones that does not appropriately.