-
Subzero: Fix a register allocation issue for "advanced phi lowering". · 5bc44313Jim Stichnoth authored
When the advanced phi lowering handles a phi arg that is Undef, it lowers it to an assignment of a constant zero (or vector of zeroes). The ad-hoc register allocation was missing the fact that a vector of zeroes is done with "pxor %reg, %reg". This resulted in a pxor instruction with invalid addressing modes at emission time. The fix is to tell legalize() to use the dest physical register if dest has one; and if dest lacks a register, take the path where it actually does the ad-hoc register allocation as though the source operand were a memory operand. Tests are added for these vector undef phi args, and for scalar undef phi args as well for good measure. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/969703002
5bc44313
×