[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:38:24 PST 2023
================
@@ -26219,6 +26223,21 @@ SDValue DAGCombiner::visitFP_TO_BF16(SDNode *N) {
return SDValue();
}
+SDValue DAGCombiner::visitBF16_TO_FP(SDNode *N) {
----------------
topperc wrote:
You need to use `APInt DemandedBits = APInt::getLoBitsSet(N0.getScalarValueSizeInBits(), 16);` so that only the lower 16 bits are demanded.
https://github.com/llvm/llvm-project/pull/69426
More information about the llvm-commits
mailing list