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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 09:30:19 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:

Sorry, I misunderstood your original question. I hadn't realised promotion was an option for floating point types. I will investigate further.

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


More information about the llvm-commits mailing list