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

Issue 383303003: Lower casting operations that involve vector types. (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 casting operations that involve vector types. Impacted instructions: bitcast {v4f32, v4i32, v8i16, v16i8} <-> {v4f32, v4i32, v8i16, v16i8} bitcast v8i1 <-> i8 bitcast v16i1 <-> i16 (There was already code present to handle trivial bitcasts like v16i1 <-> v16i1.) [sz]ext v4i1 -> v4i32 [sz]ext v8i1 -> v8i16 [sz]ext v16i1 -> v16i8 trunc v4i32 -> v4i1 trunc v8i16 -> v8i1 trunc v16i8 -> v16i1 [su]itofp v4i32 -> v4f32 fpto[su]i v4f32 -> v4i32 Where there is a relatively simple lowering to x86 instructions, it has been used. Otherwise a helper call is used. Some lowerings require a materialization of a integer vector with 1s in each entry. Since there is no support for vector constant pools, the constant is materialized purely through register operations. 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=83b8036

Patch Set 1 #

Patch Set 2 : Fix accidental changes to other parts of the code due to improper rebase #

Patch Set 3 : Remove insertelement / extractelement. #

Patch Set 4 : Fix formatting changes #

Total comments: 14

Patch Set 5 : Changes from first round of comments #

Patch Set 6 : Fix formatting in for loop. #

Total comments: 4

Patch Set 7 : Rebase and make bitcast changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+637 lines, -49 lines) Patch
M src/IceInstX8632.h View 1 2 3 4 5 6 3 chunks +12 lines, -0 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 5 6 7 chunks +51 lines, -5 lines 0 comments Download
M src/IceInstX8632.def View 1 chunk +17 lines, -17 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 6 2 chunks +22 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 14 chunks +149 lines, -27 lines 0 comments Download
A tests_lit/llvm2ice_tests/vector-bitcast.ll View 1 2 3 4 5 6 1 chunk +222 lines, -0 lines 0 comments Download
A tests_lit/llvm2ice_tests/vector-cast.ll View 1 2 3 4 1 chunk +164 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
wala
6 years, 5 months ago (2014-07-11 22:41:34 UTC) #1
Jim Stichnoth
https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1527 src/IceTargetLoweringX8632.cpp:1527: Variable *OneMask = makeReg(DestTy); Seems to be substantial code ...
6 years, 5 months ago (2014-07-14 18:33:12 UTC) #2
wala
https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1648 src/IceTargetLoweringX8632.cpp:1648: _cvt(T, Src0RM); On 2014/07/14 18:33:12, stichnot wrote: > Looks ...
6 years, 5 months ago (2014-07-14 20:52:23 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1681 src/IceTargetLoweringX8632.cpp:1681: InstCall *Call = makeHelperCall("__fptoui_v4f32", Dest, MaxSrcs); On 2014/07/14 20:52:22, ...
6 years, 5 months ago (2014-07-14 22:23:31 UTC) #4
jvoung (off chromium)
https://codereview.chromium.org/383303003/diff/60001/tests_lit/llvm2ice_tests/vector-cast.ll File tests_lit/llvm2ice_tests/vector-cast.ll (right): https://codereview.chromium.org/383303003/diff/60001/tests_lit/llvm2ice_tests/vector-cast.ll#newcode19 tests_lit/llvm2ice_tests/vector-cast.ll:19: ; CHECK-NEXT: ret Are these the only cases where ...
6 years, 5 months ago (2014-07-15 00:24:11 UTC) #5
wala
https://codereview.chromium.org/383303003/diff/60001/tests_lit/llvm2ice_tests/vector-cast.ll File tests_lit/llvm2ice_tests/vector-cast.ll (right): https://codereview.chromium.org/383303003/diff/60001/tests_lit/llvm2ice_tests/vector-cast.ll#newcode19 tests_lit/llvm2ice_tests/vector-cast.ll:19: ; CHECK-NEXT: ret On 2014/07/15 00:24:11, jvoung wrote: > ...
6 years, 5 months ago (2014-07-15 00:41:10 UTC) #6
wala
https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1527 src/IceTargetLoweringX8632.cpp:1527: Variable *OneMask = makeReg(DestTy); On 2014/07/14 18:33:12, stichnot wrote: ...
6 years, 5 months ago (2014-07-15 22:52:22 UTC) #7
Jim Stichnoth
lgtm https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/383303003/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1544 src/IceTargetLoweringX8632.cpp:1544: SizeT ShiftAmount = 8 * typeWidthInBytes(typeElementType(DestTy)) - 1; ...
6 years, 5 months ago (2014-07-15 23:15:44 UTC) #8
jvoung (off chromium)
LGTM https://codereview.chromium.org/383303003/diff/110001/tests_lit/llvm2ice_tests/vector-bitcast.ll File tests_lit/llvm2ice_tests/vector-bitcast.ll (right): https://codereview.chromium.org/383303003/diff/110001/tests_lit/llvm2ice_tests/vector-bitcast.ll#newcode189 tests_lit/llvm2ice_tests/vector-bitcast.ll:189: ; CHECK: call Sz_bitcast_v16i1_to_i16 Could add the OPTM1 ...
6 years, 5 months ago (2014-07-16 00:01:38 UTC) #9
wala
https://codereview.chromium.org/383303003/diff/110001/tests_lit/llvm2ice_tests/vector-bitcast.ll File tests_lit/llvm2ice_tests/vector-bitcast.ll (right): https://codereview.chromium.org/383303003/diff/110001/tests_lit/llvm2ice_tests/vector-bitcast.ll#newcode189 tests_lit/llvm2ice_tests/vector-bitcast.ll:189: ; CHECK: call Sz_bitcast_v16i1_to_i16 On 2014/07/16 00:01:38, jvoung wrote: ...
6 years, 5 months ago (2014-07-16 17:19:02 UTC) #10
wala
6 years, 5 months ago (2014-07-16 17:21:33 UTC) #11
Message was sent while issue was closed.
Committed patchset #7 manually as r83b8036 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698