[llvm] [AMDGPU] Legalize strict fp_extend from bf16 (PR #215477)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 04:45:34 PDT 2026
================
@@ -5006,10 +5006,13 @@ SDValue SITargetLowering::lowerFP_EXTEND(SDValue Op, SelectionDAG &DAG) const {
DAG.getNode(ISD::BITCAST, SL, SrcVT.changeTypeToInteger(), Src);
EVT DstVT = Op.getValueType();
+ SDValue Result = DAG.getNode(ISD::BF16_TO_FP, SL, DstVT, BitCast);
+ // bf16 -> f32/f64 extension is exact and cannot raise an FP exception, so
+ // the strict chain can pass through unchanged.
----------------
arsenm wrote:
It may raise an exception if the input is snan
https://github.com/llvm/llvm-project/pull/215477
More information about the llvm-commits
mailing list