-
Subzero: Make sure register preferences obey register class constraints. · dd7b846cJim Stichnoth authored
The bug was first spotted in the optimized gl_Color4ub() from spec2k's mesa. The lowering sequences for fptosi and fptoui with i8 or i16 include "mov T_2, T_1" where T_1 and T_2 may have different integer types, and the statement: T_2->setPreferredRegister(T_1, true); If T_2's type is i8 and T_1 is assigned a register that has no 8-bit version, then T_2 gets an unsuitable register. The fix is to honor RegisterOverlap only when RegMask allows. It's hard to construct a good test for this, since it depends heavily on register allocation decisions, which will change over time. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/544713002dd7b846c
×