The tests test/CodeGen/Generic/select-cc.ll and test/CodeGen/PowerPC/select-cc.ll both fail with VSX enabled. The problem is that the lowering logic for the SELECT and SELECT_CC operations doesn't currently support the VSX registers. This patch fixes that.
In lib/Target/PowerPC/PPCInstrInfo.td, we have pseudos to handle this for other register classes. Similar pseudos are added in PPCInstrVSX.td (they must be there, because the "vsrc" register class
definition appears there) for the VSRC register class. The SELECT_VSRC pseudo is then used in pattern matching for SELECT_CC.
The rest of the patch just adds logic for SELECT_VSRC wherever similar logic appears for SELECT_VRRC.
There are no new test cases because the existing tests above test this, along with a variant in test/CodeGen/PowerPC/vsx.ll.
One question is whether we want to add similar code for the VSFRC register class. We currently have _F8 variants of these pseudos to support the f64 type. We could add _VSFRC variants that override these in PPCInstrVSX.td. It's not a priori clear to me whether this would be helpful; there may be random effects of introducing copies between the F8RC and VFRC registers, but obviously the benefit is to allow RA to use all 64 scalar float regs. Thoughts?