[PATCH] D108039: [AArch64][SME] Support NEON scalar FP instructions in streaming mode
Cullen Rhodes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 07:10:55 PDT 2021
c-rhodes added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:6834
let mayLoad = 0, mayStore = 0, hasSideEffects = 0 in {
+ // FABD is illegal in streaming mode. FMULX/FRECPS/FRSQRTS are legal.
+ let Predicates = !if(!ne(opc, 0b010), [HasNEONorStreamingSVE],
----------------
c-rhodes wrote:
> david-arm wrote:
> > Hi @c-rhodes, I think this might look nicer if we just put predicates around the instructions that derive from these classes instead, i.e.
> >
> > let Predicate = [HasNEON] in {
> > defm FABD : SIMDFPThreeScalar<1, 1, 0b010, "fabd", int_aarch64_sisd_fabd>;
> > }
> >
> > let Predicates = [HasNEONorStreamingSVE] in {
> > defm FMULX : SIMDFPThreeScalar<0, 0, 0b011, "fmulx", int_aarch64_neon_fmulx>;
> > defm FRECPS : SIMDFPThreeScalar<0, 0, 0b111, "frecps", int_aarch64_neon_frecps>;
> > defm FRSQRTS : SIMDFPThreeScalar<0, 1, 0b111, "frsqrts", int_aarch64_neon_frsqrts>;
> > }
> >
> > Hi @c-rhodes, I think this might look nicer if we just put predicates around the instructions that derive from these classes instead, i.e.
> >
> > let Predicate = [HasNEON] in {
> > defm FABD : SIMDFPThreeScalar<1, 1, 0b010, "fabd", int_aarch64_sisd_fabd>;
> > }
> >
> > let Predicates = [HasNEONorStreamingSVE] in {
> > defm FMULX : SIMDFPThreeScalar<0, 0, 0b011, "fmulx", int_aarch64_neon_fmulx>;
> > defm FRECPS : SIMDFPThreeScalar<0, 0, 0b111, "frecps", int_aarch64_neon_frecps>;
> > defm FRSQRTS : SIMDFPThreeScalar<0, 1, 0b111, "frsqrts", int_aarch64_neon_frsqrts>;
> > }
> >
>
> that would break the fp16 variant which requires `+fullfp16`
> > Hi @c-rhodes, I think this might look nicer if we just put predicates around the instructions that derive from these classes instead, i.e.
> >
> > let Predicate = [HasNEON] in {
> > defm FABD : SIMDFPThreeScalar<1, 1, 0b010, "fabd", int_aarch64_sisd_fabd>;
> > }
> >
> > let Predicates = [HasNEONorStreamingSVE] in {
> > defm FMULX : SIMDFPThreeScalar<0, 0, 0b011, "fmulx", int_aarch64_neon_fmulx>;
> > defm FRECPS : SIMDFPThreeScalar<0, 0, 0b111, "frecps", int_aarch64_neon_frecps>;
> > defm FRSQRTS : SIMDFPThreeScalar<0, 1, 0b111, "frsqrts", int_aarch64_neon_frsqrts>;
> > }
> >
>
> that would break the fp16 variant which requires `+fullfp16`
I've changed it to pass the predicate as an argument, hopefully that makes it clearer
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108039/new/
https://reviews.llvm.org/D108039
More information about the llvm-commits
mailing list