Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Issue 969703002: Subzero: Fix a register allocation issue for "advanced phi lowering". (Closed)

Created:
5 years, 9 months ago by Jim Stichnoth
Modified:
5 years, 9 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero: 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -4 lines) Patch
M src/IceTargetLoweringX8632.cpp View 1 2 chunks +19 lines, -4 lines 2 comments Download
M tests_lit/llvm2ice_tests/phi.ll View 2 chunks +58 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Jim Stichnoth
5 years, 9 months ago (2015-03-02 02:44:09 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/969703002/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/969703002/diff/1/src/IceTargetLoweringX8632.cpp#newcode1694 src/IceTargetLoweringX8632.cpp:1694: // an immediate, otherwise RI can be anything. The ...
5 years, 9 months ago (2015-03-02 19:27:56 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/969703002/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/969703002/diff/1/src/IceTargetLoweringX8632.cpp#newcode1694 src/IceTargetLoweringX8632.cpp:1694: // an immediate, otherwise RI can be anything. On ...
5 years, 9 months ago (2015-03-02 23:33:53 UTC) #4
jvoung (off chromium)
lgtm https://codereview.chromium.org/969703002/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/969703002/diff/20001/src/IceTargetLoweringX8632.cpp#newcode1694 src/IceTargetLoweringX8632.cpp:1694: Operand *RI; Besides Phi, it does seem like ...
5 years, 9 months ago (2015-03-03 00:46:25 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/969703002/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/969703002/diff/20001/src/IceTargetLoweringX8632.cpp#newcode1694 src/IceTargetLoweringX8632.cpp:1694: Operand *RI; On 2015/03/03 00:46:25, jvoung wrote: > Besides ...
5 years, 9 months ago (2015-03-03 00:53:50 UTC) #6
Jim Stichnoth
5 years, 9 months ago (2015-03-03 00:56:34 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
5bc44313f70058f97bfd427a115316cc6daeff5f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698