[PATCH] D76508: [VectorUtils] move x86's scaleShuffleMask to generic VectorUtils
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 20 10:50:26 PDT 2020
efriedma added a comment.
Whether a given transform is endian-agnostic depends on the specific transform. If you're talking about reordering a bitcast and a shuffle, in particular, I'm pretty sure that's endian-agnostic. Trivial example:
%shufflefirst = shufflevector <1 x i64> %x, <1 x i64> %x, <1 x i32> <i32 0>
%z = bitcast <1 x i64> %shufflefirst to <2 x i32>
vs.
%bitcastfirst = bitcast <1 x i64> %x to <2 x i32>
%result = shufflevector <2 x i32> %bitcastfirst, <1 x i32> %bitcastfirst, <2 x i32> <i32 0, i32 1>
The shuffle is a no-op; an identity shuffle is spelled the same way on big-endian and little-endian targets.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76508/new/
https://reviews.llvm.org/D76508
More information about the llvm-commits
mailing list