[PATCH] D138872: [InstCombine] canonicalize trunc + insert as bitcast + shuffle, part 1
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 06:00:47 PST 2022
RKSimon added a comment.
@lebedev.ri Do you mean this pattern?
define <8 x i16> @src(i64 %a0) {
%v = insertelement <2 x i64> poison, i64 %a0, i32 0
%r = bitcast <2 x i64> %v to <8 x i16>
ret <8 x i16> %r
}
define <8 x i16> @tgt(i64 %a0) {
%v = bitcast i64 %a0 to <4 x i16>
%r = shufflevector <4 x i16> %v, <4 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
ret <8 x i16> %r
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138872/new/
https://reviews.llvm.org/D138872
More information about the llvm-commits
mailing list