how to overwrite target specific flag conditionally in Instruction in td file

Hi,
I just want to overwrite target specific flag in Instruction conditionally based on different register class as in operand in td file.
Is there any mechanism or hook function that can do it?

Thanks,
Jerry

-------- Forwarding messages --------