[llvm] [DAGCombine] Add DAG optimisation for BF16_TO_FP (PR #69426)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 26 20:35:52 PST 2023
================
@@ -26137,14 +26141,16 @@ SDValue DAGCombiner::visitFP_TO_FP16(SDNode *N) {
}
SDValue DAGCombiner::visitFP16_TO_FP(SDNode *N) {
+ auto Op = N->getOpcode();
+ assert((Op == ISD::FP16_TO_FP || Op == ISD::BF16_TO_FP) &&
+ "opcode should be FP16_TO_FP or BF16_TO_FP.");
SDValue N0 = N->getOperand(0);
// fold fp16_to_fp(op & 0xffff) -> fp16_to_fp(op)
----------------
topperc wrote:
Update comment for bf16_to_fp too
https://github.com/llvm/llvm-project/pull/69426
More information about the llvm-commits
mailing list