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

Side by Side Diff: crosstest/test_bitmanip_intrin.ll

Issue 390443005: Lower bitmanip intrinsics, assuming absence of BMI/SSE4.2 for now. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crosstest/test_bitmanip.def ('k') | crosstest/test_bitmanip_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Wrappers around the bit manipulation intrinsics, which use name mangling
2 ; for encoding the type in the name instead of plain "C" suffixes.
3 ; E.g., my_ctpop(unsigned long long) vs __builtin_popcountll(...)
4 ; Also, normalize the intrinsic to take a single parameter when there
5 ; can be two, as is the case for ctlz and cttz.
6
7 target triple = "i686-pc-linux-gnu"
8
9 declare i32 @llvm.ctlz.i32(i32, i1)
10 declare i64 @llvm.ctlz.i64(i64, i1)
11
12 declare i32 @llvm.cttz.i32(i32, i1)
13 declare i64 @llvm.cttz.i64(i64, i1)
14
15 declare i32 @llvm.ctpop.i32(i32)
16 declare i64 @llvm.ctpop.i64(i64)
17
18 define i32 @_Z7my_ctlzj(i32 %a) {
19 %x = call i32 @llvm.ctlz.i32(i32 %a, i1 0)
20 ret i32 %x
21 }
22
23 define i64 @_Z7my_ctlzy(i64 %a) {
24 %x = call i64 @llvm.ctlz.i64(i64 %a, i1 0)
25 ret i64 %x
26 }
27
28 define i32 @_Z7my_cttzj(i32 %a) {
29 %x = call i32 @llvm.cttz.i32(i32 %a, i1 0)
30 ret i32 %x
31 }
32
33 define i64 @_Z7my_cttzy(i64 %a) {
34 %x = call i64 @llvm.cttz.i64(i64 %a, i1 0)
35 ret i64 %x
36 }
37
38 define i32 @_Z8my_ctpopj(i32 %a) {
39 %x = call i32 @llvm.ctpop.i32(i32 %a)
40 ret i32 %x
41 }
42
43 define i64 @_Z8my_ctpopy(i64 %a) {
44 %x = call i64 @llvm.ctpop.i64(i64 %a)
45 ret i64 %x
46 }
OLDNEW
« no previous file with comments | « crosstest/test_bitmanip.def ('k') | crosstest/test_bitmanip_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698