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

Issue 443203003: Subzero: Use scalar arithmetic when no vector instruction exists. (Closed)

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

Description

Subzero: Use scalar arithmetic when no vector instruction exists. Implement scalarizeArithmetic() which extracts the components of the input vectors, performs the operation with scalar instructions, and builds the output vector component by component. Fix the lowering of sdiv and srem. These were previously emitting a wrong instruction (cdq) for i8 and i16 inputs (needing cbw, cwd). In the test_arith crosstest, mask the inputs to vector shift operations to ensure that the shifts are in range. Otherwise the Subzero output is not identical to the llc output in some (undefined) cases. BUG=none R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=afeaee4

Patch Set 1 #

Patch Set 2 : Minor fixes: whitespace, formatting, variable names, etc. #

Total comments: 14

Patch Set 3 : Address comments #

Total comments: 2

Patch Set 4 : TODO(stichnot) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -196 lines) Patch
M crosstest/test_arith.h View 2 chunks +2 lines, -2 lines 0 comments Download
M crosstest/test_arith.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M crosstest/test_arith.def View 1 1 chunk +20 lines, -20 lines 0 comments Download
M crosstest/test_arith_main.cpp View 1 2 4 chunks +9 lines, -40 lines 0 comments Download
M src/IceInstX8632.h View 2 chunks +11 lines, -11 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 2 chunks +25 lines, -9 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 2 chunks +5 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 5 chunks +72 lines, -87 lines 0 comments Download
A tests_lit/llvm2ice_tests/sdiv.ll View 1 chunk +82 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/vector-arith.ll View 23 chunks +216 lines, -23 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
wala
6 years, 4 months ago (2014-08-06 22:42:52 UTC) #1
Jim Stichnoth
https://codereview.chromium.org/443203003/diff/20001/crosstest/test_arith_main.cpp File crosstest/test_arith_main.cpp (left): https://codereview.chromium.org/443203003/diff/20001/crosstest/test_arith_main.cpp#oldcode364 crosstest/test_arith_main.cpp:364: // Subzero helpers Cool! https://codereview.chromium.org/443203003/diff/20001/crosstest/test_arith_main.cpp File crosstest/test_arith_main.cpp (right): https://codereview.chromium.org/443203003/diff/20001/crosstest/test_arith_main.cpp#newcode207 ...
6 years, 4 months ago (2014-08-07 19:58:10 UTC) #2
wala
https://codereview.chromium.org/443203003/diff/20001/crosstest/test_arith_main.cpp File crosstest/test_arith_main.cpp (left): https://codereview.chromium.org/443203003/diff/20001/crosstest/test_arith_main.cpp#oldcode364 crosstest/test_arith_main.cpp:364: // Subzero helpers On 2014/08/07 19:58:10, stichnot wrote: > ...
6 years, 4 months ago (2014-08-07 20:30:36 UTC) #3
Jim Stichnoth
lgtm https://codereview.chromium.org/443203003/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/443203003/diff/40001/src/IceTargetLoweringX8632.cpp#newcode3725 src/IceTargetLoweringX8632.cpp:3725: // TODO: Use postLower() in -Om1 mode to ...
6 years, 4 months ago (2014-08-07 20:35:17 UTC) #4
wala
https://codereview.chromium.org/443203003/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/443203003/diff/40001/src/IceTargetLoweringX8632.cpp#newcode3725 src/IceTargetLoweringX8632.cpp:3725: // TODO: Use postLower() in -Om1 mode to avoid ...
6 years, 4 months ago (2014-08-07 20:47:22 UTC) #5
wala
6 years, 4 months ago (2014-08-07 20:47:34 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 manually as afeaee4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698