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

Issue 511543002: Subzero: Fix some legalization issues involving immediates. (Closed)

Created:
6 years, 3 months ago by Jim Stichnoth
Modified:
6 years, 3 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Fix some legalization issues involving immediates. Some lowering sequences were incorrectly allowing immediate operands in native instructions. This includes 32-bit icmp, 64-bit icmp, select, switch, and 64-bit mul. BUG= none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=ef8cf0e

Patch Set 1 #

Patch Set 2 : Legalize the switch instruction operand #

Patch Set 3 : Use CHECK-LABEL #

Total comments: 6

Patch Set 4 : Code review changes, first round #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -135 lines) Patch
M src/IceTargetLoweringX8632.cpp View 1 2 3 9 chunks +17 lines, -13 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 1 2 75 chunks +176 lines, -122 lines 0 comments Download
M tests_lit/llvm2ice_tests/arith-opt.ll View 1 chunk +10 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/bool-opt.ll View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/select-opt.ll View 1 1 chunk +21 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/switch-opt.ll View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Jim Stichnoth
stichnot@chromium.org changed reviewers: + jvoung@chromium.org
6 years, 3 months ago (2014-08-26 20:14:56 UTC) #1
Jim Stichnoth
6 years, 3 months ago (2014-08-26 20:34:44 UTC) #2
jvoung (off chromium)
Otherwise LGTM https://codereview.chromium.org/511543002/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/511543002/diff/40001/src/IceTargetLoweringX8632.cpp#newcode2629 src/IceTargetLoweringX8632.cpp:2629: Operand *Src0LoRM = legalize(loOperand(Src0), Legal_All & ~Legal_Imm); ...
6 years, 3 months ago (2014-08-26 21:59:46 UTC) #3
Jim Stichnoth
Committed patchset #4 manually as ef8cf0e (presubmit successful).
6 years, 3 months ago (2014-08-27 05:16:33 UTC) #4
Jim Stichnoth
6 years, 3 months ago (2014-08-27 06:19:47 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/511543002/diff/40001/src/IceTargetLoweringX86...
File src/IceTargetLoweringX8632.cpp (right):

https://codereview.chromium.org/511543002/diff/40001/src/IceTargetLoweringX86...
src/IceTargetLoweringX8632.cpp:2629: Operand *Src0LoRM =
legalize(loOperand(Src0), Legal_All & ~Legal_Imm);
On 2014/08/26 21:59:46, jvoung wrote:
> There is a difference between Legal_All & ~Legal_Imm and Legal_Reg |
Legal_Mem,
> but I wasn't sure if it made a difference here. Just wanted to check.
Otherwise,
> more places seem to just use "Legal_Reg | Legal_Mem"

Good point, I forgot about the Legal_Reloc hack.  I'll change all those to the
usual whitelist.

https://codereview.chromium.org/511543002/diff/40001/src/IceTargetLoweringX86...
src/IceTargetLoweringX8632.cpp:2661: Operand *Src0New = legalize(
On 2014/08/26 21:59:45, jvoung wrote:
> Maybe it could be call "...RM" instead of "...New" ?

Done.

https://codereview.chromium.org/511543002/diff/40001/tests_lit/llvm2ice_tests...
File tests_lit/llvm2ice_tests/bool-opt.ll (right):

https://codereview.chromium.org/511543002/diff/40001/tests_lit/llvm2ice_tests...
tests_lit/llvm2ice_tests/bool-opt.ll:27: ; CHECK-NOT: cmp {{[0-9]+}}, {{[0-9]+}}
On 2014/08/26 21:59:46, jvoung wrote:
> Do you need the second pair of ints after the comma (the other tests just
check
> the first src)

Done.

Powered by Google App Engine
This is Rietveld 408576698