[x64] Add i64x2.abs

This instruction has a single instruction lowering in AVX512F/VL and a three instruction lowering in AVX but neither is currently supported in the x64 backend. To implement this, we instead subtract the vector from 0 and use a blending instruction to pick the lanes containing the absolute value.
This commit is contained in:
Andrew Brown
2021-03-02 09:54:19 -08:00
parent 3c57c1b2bc
commit 508f8fa5a9
6 changed files with 36 additions and 6 deletions

View File

@@ -470,6 +470,7 @@ pub enum SseOpcode {
Andpd,
Andnps,
Andnpd,
Blendvpd,
Comiss,
Comisd,
Cmpps,
@@ -758,7 +759,8 @@ impl SseOpcode {
| SseOpcode::Palignr
| SseOpcode::Pshufb => SSSE3,
SseOpcode::Insertps
SseOpcode::Blendvpd
| SseOpcode::Insertps
| SseOpcode::Packusdw
| SseOpcode::Pcmpeqq
| SseOpcode::Pextrb
@@ -816,6 +818,7 @@ impl fmt::Debug for SseOpcode {
SseOpcode::Andps => "andps",
SseOpcode::Andnps => "andnps",
SseOpcode::Andnpd => "andnpd",
SseOpcode::Blendvpd => "blendvpd",
SseOpcode::Cmpps => "cmpps",
SseOpcode::Cmppd => "cmppd",
SseOpcode::Cmpss => "cmpss",