There are some patterns in td files without MVT/class set for some operands in target
pattern that are from the source pattern. This prevents GlobalISelEmitter from adding
them as a valid rule, because the target child operand is an unsupported kind operand.
For now, for a leaf child, only IntInit and DefInit are handled in GlobalISelEmitter.
This issue can be workaround by adding MVT/class to the patterns in the td files, like
the workarounds for patterns anyext and setcc in PPCInstrInfo.td in D140878.
To avoid adding the same workarounds for other patterns in td files, this patch tries to
handle the UnsetInit case in GlobalISelEmitter.
Adding the new handling allows us to remove the workarounds in the td files and also
generates many selection rules for PPC target.
Before the change:
After the change:
This should be expected as now global-isel are reusing more patterns defined in TD files. But here there is an opportunity to remove the fmov?