DescriptionSubzero: Fix a register allocation issue for "advanced phi lowering".
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
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=5bc44313f70058f97bfd427a115316cc6daeff5f
Patch Set 1 #
Total comments: 2
Patch Set 2 : Improve comments #
Total comments: 2
Messages
Total messages: 7 (1 generated)
|