1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
Hal Finkel 608dbe4a4d Fix register subclass handling in PPCInstrInfo::insertSelect
PPCInstrInfo::insertSelect and PPCInstrInfo::canInsertSelect were computing the
common subclass of the true and false inputs, and then selecting either the
32-bit or the 64-bit isel variant based on the result of calling
PPC::GPRCRegClass.hasSubClassEq(RC) and PPC::G8RCRegClass.hasSubClassEq(RC)
(where RC is the common subclass). Unfortunately, this is not quite right: if
we have something like this:

  %vreg8<def> = SELECT_CC_I8 %vreg4<kill>, %vreg7<kill>, %vreg6<kill>, 76;
    G8RC_and_G8RC_NOX0:%vreg8 CRRC:%vreg4 G8RC_NOX0:%vreg7,%vreg6

then the common subclass of G8RC_and_G8RC_NOX0 and G8RC_NOX0 is G8RC_NOX0, and
G8RC_NOX0 is not a subclass of G8RC (because it also contains the ZERO8
pseudo-register). As a result, we also need to check the common subclass
against GPRC_NOR0 and G8RC_NOX0 explicitly.

This had not been a problem for clients of insertSelect that called
canInsertSelect first (because it had a compensating mistake), but insertSelect
is also used by the PPC pseudo-instruction expander, and this error was causing
a problem in that context.

This problem was found by csmith.

llvm-svn: 186343
2013-07-15 20:22:58 +00:00
..
2011-05-02 15:58:16 +00:00
2013-07-01 19:42:46 +00:00
2013-03-27 06:52:27 +00:00
2013-07-03 17:59:07 +00:00
2010-07-16 22:51:10 +00:00
2010-03-28 07:58:37 +00:00
2013-04-05 23:29:01 +00:00
2012-12-20 17:47:27 +00:00
2013-04-01 15:58:15 +00:00
2012-08-28 02:10:15 +00:00
2011-05-02 15:58:16 +00:00
2013-01-28 18:36:58 +00:00
2010-01-05 17:55:26 +00:00
2012-08-28 02:10:33 +00:00
2010-11-14 22:22:14 +00:00
2010-11-14 22:22:14 +00:00
2013-04-27 00:43:16 +00:00
2010-11-14 22:22:14 +00:00
2012-12-19 15:49:14 +00:00