Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
simde
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
simde
Commits
3f0321ba
Commit
3f0321ba
authored
Oct 19, 2023
by
Michael R. Crusoe
Committed by
Michael R. Crusoe
Oct 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sse _mm_movemask_ps: remove unused code
parent
4c7c7721
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
x86/sse.h
x86/sse.h
+5
-16
No files found.
x86/sse.h
View file @
3f0321ba
...
@@ -3323,28 +3323,17 @@ simde_mm_movemask_ps (simde__m128 a) {
...
@@ -3323,28 +3323,17 @@ simde_mm_movemask_ps (simde__m128 a) {
int
r
=
0
;
int
r
=
0
;
simde__m128_private
a_
=
simde__m128_to_private
(
a
);
simde__m128_private
a_
=
simde__m128_to_private
(
a
);
#if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
static
const
int32_t
shift
[
4
]
=
{
0
,
1
,
2
,
3
};
uint32x4_t
tmp
=
vshrq_n_u32
(
a_
.
neon_u32
,
31
);
return
HEDLEY_STATIC_CAST
(
int32_t
,
vaddvq_u32
(
vshlq_u32
(
tmp
,
vld1q_s32
(
shift
))));
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
// Shift out everything but the sign bits with a 32-bit unsigned shift right.
// Shift out everything but the sign bits with a 32-bit unsigned shift right.
uint64x2_t
high_bits
=
vreinterpretq_u64_u32
(
vshrq_n_u32
(
a_
.
neon_u32
,
31
));
uint64x2_t
high_bits
=
vreinterpretq_u64_u32
(
vshrq_n_u32
(
a_
.
neon_u32
,
31
));
// Merge the two pairs together with a 64-bit unsigned shift right + add.
// Merge the two pairs together with a 64-bit unsigned shift right + add.
uint8x16_t
paired
=
vreinterpretq_u8_u64
(
vsraq_n_u64
(
high_bits
,
high_bits
,
31
));
uint8x16_t
paired
=
vreinterpretq_u8_u64
(
vsraq_n_u64
(
high_bits
,
high_bits
,
31
));
// Extract the result.
// Extract the result.
return
vgetq_lane_u8
(
paired
,
0
)
|
(
vgetq_lane_u8
(
paired
,
8
)
<<
2
);
return
vgetq_lane_u8
(
paired
,
0
)
|
(
vgetq_lane_u8
(
paired
,
8
)
<<
2
);
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
static
const
uint32_t
md
[
4
]
=
{
1
<<
0
,
1
<<
1
,
1
<<
2
,
1
<<
3
};
uint32x4_t
extended
=
vreinterpretq_u32_s32
(
vshrq_n_s32
(
a_
.
neon_i32
,
31
));
uint32x4_t
masked
=
vandq_u32
(
vld1q_u32
(
md
),
extended
);
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return
HEDLEY_STATIC_CAST
(
int32_t
,
vaddvq_u32
(
masked
));
#else
uint64x2_t
t64
=
vpaddlq_u32
(
masked
);
return
HEDLEY_STATIC_CAST
(
int
,
vgetq_lane_u64
(
t64
,
0
))
+
HEDLEY_STATIC_CAST
(
int
,
vgetq_lane_u64
(
t64
,
1
));
#endif
#elif defined(SIMDE_POWER_ALTIVEC_P8_NATIVE) && defined(SIMDE_BUG_CLANG_50932)
#elif defined(SIMDE_POWER_ALTIVEC_P8_NATIVE) && defined(SIMDE_BUG_CLANG_50932)
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
char
)
idx
=
{
96
,
64
,
32
,
0
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
};
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
char
)
idx
=
{
96
,
64
,
32
,
0
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
};
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
char
)
res
=
HEDLEY_REINTERPRET_CAST
(
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
char
),
vec_bperm
(
HEDLEY_REINTERPRET_CAST
(
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
__int128
),
a_
.
altivec_u64
),
idx
));
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
char
)
res
=
HEDLEY_REINTERPRET_CAST
(
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
char
),
vec_bperm
(
HEDLEY_REINTERPRET_CAST
(
SIMDE_POWER_ALTIVEC_VECTOR
(
unsigned
__int128
),
a_
.
altivec_u64
),
idx
));
...
...
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