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
define dso_local <2 x i64> @a(<16 x i8> noundef %a) local_unnamed_addr {
entry:
%vecext.i = extractelement <16 x i8> %a, i647%conv.i = sexti8%vecext.itoi64%vecinit.i = insertelement <2 x i64> poison, i64%conv.i, i640%vecext1.i = extractelement <16 x i8> %a, i6415%conv2.i = sexti8%vecext1.itoi64%vecinit3.i = insertelement <2 x i64> %vecinit.i, i64%conv2.i, i641ret <2 x i64> %vecinit3.i
}
but rust can't replicate that at the moment. That's a bug we'll fix on the rust side, but still I think the shufflevector should also work. And it seems like it might be smaller in LLVM IR and hence preferred for efficiency as the clang lowering as well?
The text was updated successfully, but these errors were encountered:
a correction: the rust LLVM IR always optimizes to the shufflevector version. I'm not sure why the C version doesn't, honestly. Maybe it's the poison values (which rust will not emit).
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/6sodYY3fW
This LLVM IR
does not optimize to a single instruction.
The C code uses a slightly different (more manual) lowering to LLVM IR:
https://godbolt.org/z/aencTa3nq
but rust can't replicate that at the moment. That's a bug we'll fix on the rust side, but still I think the
shufflevector
should also work. And it seems like it might be smaller in LLVM IR and hence preferred for efficiency as the clang lowering as well?The text was updated successfully, but these errors were encountered: