x64: Add support for the pblendw instruction (#6023)
This commit adds another case for `shuffle` lowering to the x64 backend
for the `{,v}pblendw` instruction. This instruction selects 16-bit
values from either of the inputs corresponding to an immediate 8-bit-mask where
each bit selects the corresponding lane from the inputs.
This commit is contained in:
@@ -1125,6 +1125,7 @@ pub enum SseOpcode {
|
||||
Punpcklqdq,
|
||||
Pshuflw,
|
||||
Pshufhw,
|
||||
Pblendw,
|
||||
}
|
||||
|
||||
impl SseOpcode {
|
||||
@@ -1318,7 +1319,8 @@ impl SseOpcode {
|
||||
| SseOpcode::Roundps
|
||||
| SseOpcode::Roundpd
|
||||
| SseOpcode::Roundss
|
||||
| SseOpcode::Roundsd => SSE41,
|
||||
| SseOpcode::Roundsd
|
||||
| SseOpcode::Pblendw => SSE41,
|
||||
|
||||
SseOpcode::Pcmpgtq => SSE42,
|
||||
}
|
||||
@@ -1521,6 +1523,7 @@ impl fmt::Debug for SseOpcode {
|
||||
SseOpcode::Punpckhqdq => "punpckhqdq",
|
||||
SseOpcode::Pshuflw => "pshuflw",
|
||||
SseOpcode::Pshufhw => "pshufhw",
|
||||
SseOpcode::Pblendw => "pblendw",
|
||||
};
|
||||
write!(fmt, "{}", name)
|
||||
}
|
||||
@@ -1705,7 +1708,8 @@ impl AvxOpcode {
|
||||
| AvxOpcode::Vpextrb
|
||||
| AvxOpcode::Vpextrw
|
||||
| AvxOpcode::Vpextrd
|
||||
| AvxOpcode::Vpextrq => {
|
||||
| AvxOpcode::Vpextrq
|
||||
| AvxOpcode::Vpblendw => {
|
||||
smallvec![InstructionSet::AVX]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user