[llvm] [SDISel][Combine] Constant fold FP16_TO_FP (PR #94790)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 12:59:33 PDT 2024
================
@@ -26586,7 +26586,12 @@ SDValue DAGCombiner::visitFP16_TO_FP(SDNode *N) {
}
}
- return SDValue();
+ // Sometimes constants manage to survive very late in the pipeline, e.g.,
+ // because they are wrapped inside the <1 x f16> type. Try one last time to
+ // get rid of them.
+ SDValue Folded = DAG.FoldConstantArithmetic(
+ N->getOpcode(), SDLoc(N), N->getValueType(0), ArrayRef<SDValue>(&N0, 1));
----------------
arsenm wrote:
{N0}?
https://github.com/llvm/llvm-project/pull/94790
More information about the llvm-commits
mailing list