[PATCH] D101297: [SLP]Allow masked gathers only if allowed by target.
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 4 04:28:00 PDT 2021
uabelho added a comment.
E.g.
opt -slp-vectorizer -S -o - slp2.ll -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900
now results in
define void @foo(%rec* %in_p) #0 {
entry:
%ptr1 = getelementptr inbounds %rec, %rec* %in_p, i16 0, i32 2
%ptr2 = getelementptr inbounds %rec, %rec* %in_p, i16 0, i32 0
%0 = insertelement <2 x i16*> poison, i16* %ptr2, i32 0
%1 = insertelement <2 x i16*> %0, i16* %ptr1, i32 1
%2 = call <2 x i16> @llvm.masked.gather.v2i16.v2p0i16(<2 x i16*> %1, i32 1, <2 x i1> <i1 true, i1 true>, <2 x i16> undef)
store <2 x i16> %2, <2 x i16>* bitcast (%rec* @g to <2 x i16>*), align 1
ret void
}
But before this patch it didn't use llvm.masked.gather.F16659590: slp2.ll <https://reviews.llvm.org/F16659590>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101297/new/
https://reviews.llvm.org/D101297
More information about the llvm-commits
mailing list