[llvm] [DAGCombine] Add DAG optimisation for BF16_TO_FP (PR #69426)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 23:12:50 PST 2023


================
@@ -2043,6 +2044,7 @@ SDValue DAGCombiner::visit(SDNode *N) {
   case ISD::FP_TO_FP16:         return visitFP_TO_FP16(N);
   case ISD::FP16_TO_FP:         return visitFP16_TO_FP(N);
   case ISD::FP_TO_BF16:         return visitFP_TO_BF16(N);
+  case ISD::BF16_TO_FP:         return visitFP16_TO_FP(N);
----------------
arsenm wrote:

Should combine the cases with the other call to visitFP16_TO_FP. I did have to check the body to make sure this was OK, so should also rename the function to reflect it handles both cases 

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


More information about the llvm-commits mailing list