[PATCH] D74632: [AArch64][SVE] Add initial backend support for FP splat_vector

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 10:53:54 PST 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:310
+  // Duplicate +0.0 into all vector elements
+  def : Pat<(nxv8f16 (AArch64dup (f16 fpimm0))), (DUP_ZI_H 0, 0)>;
+  def : Pat<(nxv4f16 (AArch64dup (f16 fpimm0))), (DUP_ZI_H 0, 0)>;
----------------
cameron.mcinally wrote:
> efriedma wrote:
> > What do we end up generating for a non-zero float immediate?  We might need a pattern to avoid an extra mov in the general case.
> > 
> > In theory, we can generate other float immediates using the integer dup/dupm, but I guess most of them won't be useful for 32-bit or 64-bit floats.  Some probably are, though; for example, you can generate 1.0 with dupm.
> I'm fairly certain that support exists in D71712. I didn't include any of the shufflevector tests or patterns in this Diff though.
> 
> My intention was to cherry-pick something small for easy reviewing. If you'd like to see that support included in this patch, I'll add it.
> 
Oh, that's fine, it doesn't need to be in the same patch.  Just wanted to make sure you were considering it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74632/new/

https://reviews.llvm.org/D74632





More information about the llvm-commits mailing list