What is the difference between
Uses = [EFLAGS] + Defs = [EFLAGS]
and their mention in selection patterns?
[(set GR64:$dst, EFLAGS, (X86smul_flag GR64:$src1, GR64:$src2))]
Basically, my problem is that I have weird instructions which undef the EFLAGS register, leaving EFLAGS in an unknown state. For example:
cmp x, y
beq z ; this is good because EFLAGS is defined
cmp x, y
weird_inst. ; undefs EFLAGS, leaves EFLAGS in a undefined state
beq z ; this is bad because EFLAGS is undefined
Is it enough to just say Defs = [EFLAGS] for the Instruction def of weird_inst? Or is it necessary for the pattern to say something like [(set EFLAGS, undef)] as well?