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

Issue 14914011: Promote bswap i16, i32, and i64 to be allowed llvm intrinsics. (Closed)

Created:
7 years, 7 months ago by jvoung (off chromium)
Modified:
7 years, 7 months ago
Reviewers:
Derek Schuff, eliben
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/pnacl-llvm.git@master
Visibility:
Public.

Description

Promote bswap i16, i32, and i64 to be allowed llvm intrinsics. Disallow i1, i8, which don't make sense for "byte" swapping. None of these generate outcalls to compiler_rt. Test coverage: * test/CodeGen/AArch64/dp1.ll (only testing i32, i64) * test/CodeGen/ARM/rev.ll (only testing i16) * test/CodeGen/Mips/bswap.ll (only testing i32, i64) * test/CodeGen/X86/bswap.ll (i16, i32, i64, on i686) * test/NaCl/{ARM,X86}/intrinsics-bitmanip.ll (i16, i32, i64) (maybe the last set of tests could be merged into the upstream tests) For targets without native i16 bswap, the i16 could just be a bswap on an i32 plus a shift right 16. Other test coverage: * gcc/testsuite/gcc.dg/builtin-bswap-[1,2,3,4,5].c Misc: style cleanups, and add comments to the undocumented intrinsics in the dev list. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3378 R=dschuff@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=5019000

Patch Set 1 #

Total comments: 6

Patch Set 2 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -14 lines) Patch
M lib/Analysis/NaCl/PNaClABIVerifyModule.cpp View 1 12 chunks +41 lines, -14 lines 0 comments Download
M test/NaCl/PNaClABI/intrinsics.ll View 3 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
jvoung (off chromium)
7 years, 7 months ago (2013-05-15 22:59:36 UTC) #1
eliben
https://codereview.chromium.org/14914011/diff/1/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp File lib/Analysis/NaCl/PNaClABIVerifyModule.cpp (right): https://codereview.chromium.org/14914011/diff/1/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp#newcode127 lib/Analysis/NaCl/PNaClABIVerifyModule.cpp:127: for (unsigned i = 0; i < AcceptableSizes.size(); ++i) ...
7 years, 7 months ago (2013-05-15 23:34:54 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/14914011/diff/1/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp File lib/Analysis/NaCl/PNaClABIVerifyModule.cpp (right): https://codereview.chromium.org/14914011/diff/1/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp#newcode127 lib/Analysis/NaCl/PNaClABIVerifyModule.cpp:127: for (unsigned i = 0; i < AcceptableSizes.size(); ++i) ...
7 years, 7 months ago (2013-05-16 16:45:00 UTC) #3
jvoung (off chromium)
ping
7 years, 7 months ago (2013-05-21 23:32:36 UTC) #4
Derek Schuff
lgtm
7 years, 7 months ago (2013-05-22 15:58:47 UTC) #5
jvoung (off chromium)
7 years, 7 months ago (2013-05-22 21:34:30 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r5019000 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698