[llvm] AMDGPU: Fix selection failure on bf16 inverse sqrt (PR #172044)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 09:04:08 PST 2025


================
@@ -16508,7 +16508,9 @@ SDValue SITargetLowering::performFDivCombine(SDNode *N,
   SelectionDAG &DAG = DCI.DAG;
   SDLoc SL(N);
   EVT VT = N->getValueType(0);
-  if ((VT != MVT::f16 && VT != MVT::bf16) || !Subtarget->has16BitInsts())
+
+  // fsqrt legality correlates to rsq availability.
----------------
arsenm wrote:

The alternative is longer since you have to check the 2 subtarget features against the type 

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


More information about the llvm-commits mailing list