[PATCH] D93307: [SVE][CodeGen] Add bfloat16 support to scalable masked gather
Kerry McLaughlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 02:52:45 PST 2020
kmclaughlin added inline comments.
================
Comment at: llvm/test/CodeGen/AArch64/sve-masked-scatter-legalise.ll:28-36
+define void @masked_scatter_nxv8bf16(<vscale x 8 x bfloat> %data, bfloat* %base, <vscale x 8 x i16> %offsets, <vscale x 8 x i1> %mask) #0 {
+; CHECK-LABEL: masked_scatter_nxv8bf16
+; CHECK-DAG: st1h { {{z[0-9]+}}.s }, {{p[0-9]+}}, [x0, {{z[0-9]+}}.s, sxtw #1]
+; CHECK-DAG: st1h { {{z[0-9]+}}.s }, {{p[0-9]+}}, [x0, {{z[0-9]+}}.s, sxtw #1]
+; CHECK: ret
+ %ptrs = getelementptr bfloat, bfloat* %base, <vscale x 8 x i16> %offsets
+ call void @llvm.masked.scatter.nxv8bf16(<vscale x 8 x bfloat> %data, <vscale x 8 x bfloat*> %ptrs, i32 1, <vscale x 8 x i1> %mask)
----------------
c-rhodes wrote:
> david-arm wrote:
> > david-arm wrote:
> > > c-rhodes wrote:
> > > > Do we need a similar test for gather in `test/CodeGen/AArch64/sve-masked-gather-legalize.ll`? I also noticed these test files differ between American/British spelling of legalize/legalise in the filename, can this be renamed to use `legalize`?
> > > +1 for the gather-legalize.ll tests.
> > Hi @c-rhodes, I wonder if it's better to do the renaming in a different patch because @kmclaughlin has made changes in this file too and it makes the diff a bit harder to read? Any new files created can be with the American spelling.
> > Hi @c-rhodes, I wonder if it's better to do the renaming in a different patch because @kmclaughlin has made changes in this file too and it makes the diff a bit harder to read? Any new files created can be with the American spelling.
>
> Sure, I think it's fine to push an NFC patch with that single change straight to main.
Hi @c-rhodes & @david-arm, I tried adding more tests to sve-masked-gather-legalize.ll for floating point after your comments and ran into some legalisation issues when the result of the gather needs to be split. This was for all floating-point types, not just bfloat so I think this should be addressed separately to this patch.
Once this lands I'm happy to push a patch changing the name of this to sve-masked-scatter-legalize.ll
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93307/new/
https://reviews.llvm.org/D93307
More information about the llvm-commits
mailing list