[PATCH] D85101: [AArch64][CodeGen] Restrict bfloat vector operations to what's actually supported

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 14:04:28 PDT 2020


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1045
+    setOperationAction(ISD::SREM, VT, Expand);
+    setOperationAction(ISD::FREM, VT, Expand);
+  }
----------------
stuij wrote:
> dnsampaio wrote:
> > dmgreen wrote:
> > > Why not leave these as expand?
> > And they are integers as well, no? Perhaps the correct tests we want here is `!VT.isFloatingPoint()` or alike?
> As I understand, as bfloat is a storage type, it should be converted explicitly to a different type if you want to do arithmetic operations. It makes sense to me to explicitly not allow this.
The frem is the only one in this list that would make sense for bf16. I believe the default would be Legal(?) So Expand seems like a sensible enough option. At least, it would seem a little odd to specifically mark them differently for bf16. We don't do anything special for fadd/fdiv/etc as far as I understand.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85101



More information about the llvm-commits mailing list