[PATCH] D95245: [SVE] Add support for scalable vectorization of loops with int/fast FP reductions

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 03:46:58 PST 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1098
+  Type *Ty = RdxDesc.getRecurrenceType();
+  if (Ty->getScalarSizeInBits() > 64)
+    return false;
----------------
david-arm wrote:
> dmgreen wrote:
> > Thanks. This looks like it should work for most current types. Are bfloats always supported? It may be better to be more specific in case other smaller-than-64bit float types are added in the future.
> Is this needed though? If bfloats are in the scalar IR it means that the user has explicitly written code using the SVE ACLE so I'd imagine that all bets are off anyway if they didn't build with bf16 support. I'd also imagine that these would be flagged up as illegal types earlier on in the vectoriser too I think?
Hmm. I guess I I don't see the advantage of getting it wrong. Clang isn't the only frontend and the vectorizer needs to take any valid input and not crash or produce code that will later crash. Being specific about which types are supported seems like a better idea to me than hoping it works and hoping that won't change in the future.


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

https://reviews.llvm.org/D95245



More information about the llvm-commits mailing list