Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
aead609f
Commit
aead609f
authored
Nov 11, 2017
by
Kirill Yukhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add forgotten tests.
From-SVN: r254657
parent
90b2566b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
0 deletions
+91
-0
gcc/testsuite/gcc.target/i386/avx512f-gf2p8affineqb-2.c
+74
-0
gcc/testsuite/gcc.target/i386/avx512vl-gf2p8affineqb-2.c
+17
-0
No files found.
gcc/testsuite/gcc.target/i386/avx512f-gf2p8affineqb-2.c
0 → 100644
View file @
aead609f
/* { dg-do run } */
/* { dg-options "-O2 -mavx512f -mgfni -mavx512bw" } */
/* { dg-require-effective-target avx512f } */
/* { dg-require-effective-target gfni } */
#define AVX512F
#define GFNI
#include "avx512f-helper.h"
#define SIZE (AVX512F_LEN / 8)
#include "avx512f-mask-type.h"
#include <x86intrin.h>
static
void
CALC
(
unsigned
char
*
r
,
unsigned
char
*
s1
,
unsigned
char
*
s2
,
unsigned
char
imm
)
{
for
(
int
a
=
0
;
a
<
SIZE
/
8
;
a
++
)
{
for
(
int
val
=
0
;
val
<
8
;
val
++
)
{
unsigned
char
result
=
0
;
for
(
int
bit
=
0
;
bit
<
8
;
bit
++
)
{
unsigned
char
temp
=
s1
[
a
*
8
+
val
]
&
s2
[
a
*
8
+
bit
];
unsigned
char
parity
=
__popcntd
(
temp
);
if
(
parity
%
2
)
result
|=
(
1
<<
(
8
-
bit
-
1
));
}
r
[
a
*
8
+
val
]
=
result
^
imm
;
}
}
}
void
TEST
(
void
)
{
int
i
;
UNION_TYPE
(
AVX512F_LEN
,
i_b
)
res1
,
res2
,
res3
,
src1
,
src2
;
MASK_TYPE
mask
=
MASK_VALUE
;
char
res_ref
[
SIZE
];
unsigned
char
imm
=
0
;
for
(
i
=
0
;
i
<
SIZE
;
i
++
)
{
src1
.
a
[
i
]
=
1
+
i
;
src2
.
a
[
i
]
=
1
;
}
for
(
i
=
0
;
i
<
SIZE
;
i
++
)
{
res1
.
a
[
i
]
=
DEFAULT_VALUE
;
res2
.
a
[
i
]
=
DEFAULT_VALUE
;
res3
.
a
[
i
]
=
DEFAULT_VALUE
;
}
CALC
(
res_ref
,
src1
.
a
,
src2
.
a
,
imm
);
res1
.
x
=
INTRINSIC
(
_gf2p8affine_epi64_epi8
)
(
src1
.
x
,
src2
.
x
,
imm
);
res2
.
x
=
INTRINSIC
(
_mask_gf2p8affine_epi64_epi8
)
(
res2
.
x
,
mask
,
src1
.
x
,
src2
.
x
,
imm
);
res3
.
x
=
INTRINSIC
(
_maskz_gf2p8affine_epi64_epi8
)
(
mask
,
src1
.
x
,
src2
.
x
,
imm
);
if
(
UNION_CHECK
(
AVX512F_LEN
,
i_b
)
(
res1
,
res_ref
))
abort
();
MASK_MERGE
(
i_b
)
(
res_ref
,
mask
,
SIZE
);
if
(
UNION_CHECK
(
AVX512F_LEN
,
i_b
)
(
res2
,
res_ref
))
abort
();
MASK_ZERO
(
i_b
)
(
res_ref
,
mask
,
SIZE
);
if
(
UNION_CHECK
(
AVX512F_LEN
,
i_b
)
(
res3
,
res_ref
))
abort
();
}
gcc/testsuite/gcc.target/i386/avx512vl-gf2p8affineqb-2.c
0 → 100644
View file @
aead609f
/* { dg-do run } */
/* { dg-options "-O2 -mavx512bw -mavx512vl -mgfni" } */
/* { dg-require-effective-target avx512vl } */
/* { dg-require-effective-target avx512bw } */
/* { dg-require-effective-target gfni } */
#define AVX512VL
#define AVX512F_LEN 256
#define AVX512F_LEN_HALF 128
#include "avx512f-gf2p8affineqb-2.c"
#undef AVX512F_LEN
#undef AVX512F_LEN_HALF
#define AVX512F_LEN 128
#define AVX512F_LEN_HALF 128
#include "avx512f-gf2p8affineqb-2.c"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment