You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it looks like a final step is missed where vmrlg + vuphh can be rewritten to just vuplhw (and similarly for the other vector types). Or maybe the shuffle vector should be recognized directly. Anyway, this seems achievable.
This came up in the context of the rust standard library
Generate more efficient code for zero or sign extensions where
the source is a subvector generated via SHUFFLE_VECTOR.
Specifically, recognize patterns corresponding to (series of)
VECTOR UNPACK instructions, or the VECTOR SIGN EXTEND TO
DOUBLEWORD instruction.
As a special case, also handle zero or sign extensions of a
vector element to i128.
Fixes: llvm/llvm-project#129576Fixes: llvm/llvm-project#129899
https://godbolt.org/z/Wxc8x8Tax
This LLVM IR
optimizes to
this is already very good, and optimal for
unpackh
, but not forunpackl
:https://godbolt.org/z/xfobea8ee
optimizes to
So it looks like a final step is missed where
vmrlg + vuphh
can be rewritten to justvuplhw
(and similarly for the other vector types). Or maybe the shuffle vector should be recognized directly. Anyway, this seems achievable.This came up in the context of the rust standard library
cc @uweigand
The text was updated successfully, but these errors were encountered: