[llvm] [LLVM][CodeGen] Add lowering for scalable vector bfloat operations. (PR #109803)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 05:08:52 PDT 2024


================
@@ -2134,6 +2166,67 @@ bool VectorLegalizer::tryExpandVecMathCall(
   return tryExpandVecMathCall(Node, LC, Results);
 }
 
+// Try to lower BFloat arithmetic by performing the same operation on operands
+// that have been promoted to Float32, the result of which is then truncated.
+// If promotion requires non-legal types the operation is split with the
+// promotion occuring during a successive call to this function.
+SDValue VectorLegalizer::ExpandBF16Arith(SDNode *Node) {
----------------
paulwalker-arm wrote:

I've removed all the promotion code and am instead making use of common code via setOperationPromotedToType.

https://github.com/llvm/llvm-project/pull/109803


More information about the llvm-commits mailing list