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

Issue 401523003: Lower insertelement and extractelement. (Closed)

Created:
6 years, 5 months ago by wala
Modified:
6 years, 5 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Lower insertelement and extractelement. Use instructions that do the operations in registers and that are available in SSE2. Spill to memory to perform the operation in the absence of any other reasonable options (v16i8 and v16i1). Unfortunately there is no natural class of SSE2 instructions that insertelement / extractelement can get lowered to for all vector types (though pinsr[bwd] and pextr[bwd] are available in SSE4.1). There are in some cases a large number of choices available for lowering and I have not looked into which choices are the best yet, besides using LLVM output as a guide. BUG=none R=jvoung@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=4988923

Patch Set 1 #

Total comments: 15

Patch Set 2 : 1) first round of changes 2) add lit test 3) rebase #

Patch Set 3 : ICETYPEX8632_TABLE formatting #

Patch Set 4 : Use a forward declaration to name i1 vector types in test_vector_ops_main.cpp #

Total comments: 4

Patch Set 5 : Address Jim's comments. #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1650 lines, -116 lines) Patch
M crosstest/runtests.sh View 2 chunks +8 lines, -0 lines 0 comments Download
A crosstest/test_vector_ops.def View 1 chunk +19 lines, -0 lines 0 comments Download
A crosstest/test_vector_ops.ll View 1 chunk +717 lines, -0 lines 0 comments Download
A crosstest/test_vector_ops_main.cpp View 1 2 3 1 chunk +225 lines, -0 lines 0 comments Download
M src/IceConverter.cpp View 2 chunks +20 lines, -0 lines 0 comments Download
M src/IceInst.h View 3 chunks +47 lines, -0 lines 0 comments Download
M src/IceInst.cpp View 3 chunks +41 lines, -0 lines 0 comments Download
M src/IceInstX8632.h View 1 2 3 4 5 7 chunks +59 lines, -42 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 5 10 chunks +84 lines, -54 lines 0 comments Download
M src/IceInstX8632.def View 1 2 3 4 5 1 chunk +18 lines, -18 lines 0 comments Download
M src/IceTargetLowering.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 5 chunks +21 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 chunks +236 lines, -2 lines 0 comments Download
A tests_lit/llvm2ice_tests/vector-ops.ll View 1 1 chunk +147 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
wala
6 years, 5 months ago (2014-07-17 01:51:31 UTC) #1
native-client-reviews_googlegroups.com
FYI LLVM is undergoing a pretty big rewrite of its shufflevector lowering for x86. It ...
6 years, 5 months ago (2014-07-17 17:51:56 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp#newcode477 src/IceInstX8632.cpp:477: template <> const char *InstX8632Lea::Opcode = "lea"; Cluster lea, ...
6 years, 5 months ago (2014-07-17 19:36:38 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.h File src/IceInstX8632.h (right): https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.h#newcode434 src/IceInstX8632.h:434: getDest()->emit(Func); Hmm, do the existing div/idiv instructions still emit ...
6 years, 5 months ago (2014-07-17 19:49:02 UTC) #4
wala
https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp#newcode477 src/IceInstX8632.cpp:477: template <> const char *InstX8632Lea::Opcode = "lea"; On 2014/07/17 ...
6 years, 5 months ago (2014-07-17 22:14:12 UTC) #5
Jim Stichnoth
Otherwise lgtm. https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp#newcode884 src/IceInstX8632.cpp:884: Str << "mov" << TypeX8632Attributes[getDest()->getType()].SdSsString; On 2014/07/17 ...
6 years, 5 months ago (2014-07-18 17:21:01 UTC) #6
jvoung (off chromium)
LGTM modulo Jim's comments
6 years, 5 months ago (2014-07-18 17:56:22 UTC) #7
wala
https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/401523003/diff/1/src/IceInstX8632.cpp#newcode884 src/IceInstX8632.cpp:884: Str << "mov" << TypeX8632Attributes[getDest()->getType()].SdSsString; On 2014/07/18 17:21:01, stichnot ...
6 years, 5 months ago (2014-07-18 19:36:13 UTC) #8
wala
6 years, 5 months ago (2014-07-18 19:45:13 UTC) #9
Message was sent while issue was closed.
Committed patchset #6 manually as r4988923 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698