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

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 04:39:40 PST 2023


================
@@ -26161,6 +26165,8 @@ SDValue DAGCombiner::visitFP_TO_BF16(SDNode *N) {
   return SDValue();
 }
 
+SDValue DAGCombiner::visitBF16_TO_FP(SDNode *N) { return visitFP16_TO_FP(N); }
----------------
RKSimon wrote:

You should probably add an assert to the start of visitFP16_TO_FP to check that the opcode is BF16_TO_FP or FP16_TO_FP

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


More information about the llvm-commits mailing list