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

Issue 547033002: Subzero: Be more strict about i1 calculations. (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: Be more strict about i1 calculations. One issue is that the test_arith cross test defined functions on i1 but never actually invoked them. Another issue is that the lowering was using 8-bit registers for i1 values, but was being sloppy about leaving stuff in the upper 7 bits, and then using all 8 bits for tests. This takes the approach of explicitly masking the result whenever it's possible for the result to exceed one bit, such as trunc, fptosi, fptoui. Another possibility might be to allow the upper 7 bits to stay sloppy, and explicitly only test the lower bit. Additionally, some "CHECK: ret" lines were removed, since they aren't actually needed after the change to use CHECK-LABEL, and they are affected by an llvm-dump bug (which is fixed in LLVM 3.6). BUG= none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=3ef786f

Patch Set 1 #

Patch Set 2 : Revert unnecessary changes #

Total comments: 2

Patch Set 3 : Revert what turned out to be unnecessary changes #

Total comments: 4

Patch Set 4 : Add comments, clean up test file #

Total comments: 3

Patch Set 5 : Slight refactoring of lowering. New lit test file. #

Patch Set 6 : Actually add the new test file this time #

Total comments: 6

Patch Set 7 : Update test after rebasing #

Patch Set 8 : Make OPTM1 change similar to CHECK change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -146 lines) Patch
M crosstest/test_arith_main.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 7 chunks +23 lines, -8 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 1 2 3 4 5 6 7 23 chunks +2 lines, -42 lines 0 comments Download
D tests_lit/llvm2ice_tests/sext_zext_i1.ll View 1 2 3 4 1 chunk +0 lines, -96 lines 0 comments Download
A tests_lit/llvm2ice_tests/test_i1.ll View 1 2 3 4 5 6 1 chunk +184 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
Jim Stichnoth
6 years, 3 months ago (2014-09-05 22:41:42 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/547033002/diff/20001/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/547033002/diff/20001/src/IceInstX8632.cpp#newcode596 src/IceInstX8632.cpp:596: if (getDest()->getType() == IceType_i1 || I don't think arithmetic ...
6 years, 3 months ago (2014-09-05 23:07:15 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/547033002/diff/20001/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/547033002/diff/20001/src/IceInstX8632.cpp#newcode596 src/IceInstX8632.cpp:596: if (getDest()->getType() == IceType_i1 || On 2014/09/05 23:07:15, jvoung ...
6 years, 3 months ago (2014-09-05 23:46:48 UTC) #4
Jim Stichnoth
Here's a simpler version. With this, spec2k 164.gzip runs correctly.
6 years, 3 months ago (2014-09-06 06:43:15 UTC) #5
jvoung (off chromium)
Nice! (that 164.gzip passes now) Maybe add a test case for xor i1 true? to ...
6 years, 3 months ago (2014-09-06 17:53:02 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/547033002/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/547033002/diff/40001/src/IceTargetLoweringX8632.cpp#newcode1973 src/IceTargetLoweringX8632.cpp:1973: _movzx(T, Src0RM); On 2014/09/06 17:53:02, jvoung wrote: > Not ...
6 years, 3 months ago (2014-09-06 21:57:27 UTC) #7
halyavin
https://codereview.chromium.org/547033002/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/547033002/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1973 src/IceTargetLoweringX8632.cpp:1973: // Widen the souce using movsx or movzx. (It ...
6 years, 3 months ago (2014-09-08 06:28:07 UTC) #9
jvoung (off chromium)
LGTM https://codereview.chromium.org/547033002/diff/60001/tests_lit/llvm2ice_tests/64bit.pnacl.ll File tests_lit/llvm2ice_tests/64bit.pnacl.ll (left): https://codereview.chromium.org/547033002/diff/60001/tests_lit/llvm2ice_tests/64bit.pnacl.ll#oldcode610 tests_lit/llvm2ice_tests/64bit.pnacl.ll:610: ; OPTM1: ret Could add the "and" to ...
6 years, 3 months ago (2014-09-08 15:46:33 UTC) #10
Jim Stichnoth
https://codereview.chromium.org/547033002/diff/60001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/547033002/diff/60001/src/IceTargetLoweringX8632.cpp#newcode1973 src/IceTargetLoweringX8632.cpp:1973: // Widen the souce using movsx or movzx. (It ...
6 years, 3 months ago (2014-09-08 17:01:03 UTC) #11
jvoung (off chromium)
LGTM https://codereview.chromium.org/547033002/diff/100001/tests_lit/llvm2ice_tests/64bit.pnacl.ll File tests_lit/llvm2ice_tests/64bit.pnacl.ll (left): https://codereview.chromium.org/547033002/diff/100001/tests_lit/llvm2ice_tests/64bit.pnacl.ll#oldcode610 tests_lit/llvm2ice_tests/64bit.pnacl.ll:610: ; OPTM1: ret Had an earlier comment about ...
6 years, 3 months ago (2014-09-08 18:06:38 UTC) #12
Jim Stichnoth
https://codereview.chromium.org/547033002/diff/100001/tests_lit/llvm2ice_tests/64bit.pnacl.ll File tests_lit/llvm2ice_tests/64bit.pnacl.ll (left): https://codereview.chromium.org/547033002/diff/100001/tests_lit/llvm2ice_tests/64bit.pnacl.ll#oldcode610 tests_lit/llvm2ice_tests/64bit.pnacl.ll:610: ; OPTM1: ret On 2014/09/08 18:06:38, jvoung wrote: > ...
6 years, 3 months ago (2014-09-08 18:17:44 UTC) #13
Jim Stichnoth
6 years, 3 months ago (2014-09-08 18:19:28 UTC) #14
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as 3ef786f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698