[llvm] [CodeGen] [AMDGPU] Attempt DAGCombine for fmul with select to ldexp (PR #111109)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 02:00:57 PST 2024
================
@@ -14595,6 +14596,70 @@ SDValue SITargetLowering::performFDivCombine(SDNode *N,
return SDValue();
}
+SDValue SITargetLowering::performFMulCombine(SDNode *N,
+ DAGCombinerInfo &DCI) const {
+ SelectionDAG &DAG = DCI.DAG;
+ EVT VT = N->getValueType(0);
+ EVT scalarVT = VT.getScalarType();
+ EVT IntVT = VT.changeElementType(MVT::i32);
+
+ SDLoc SL(N);
+ SDValue LHS = N->getOperand(0);
+ SDValue RHS = N->getOperand(1);
+
+ SDNodeFlags Flags = N->getFlags();
+ SDNodeFlags LHSFlags = LHS->getFlags();
----------------
jayfoad wrote:
Nit: SL, Flags, LHSFlags could all be sunk to where they're used.
https://github.com/llvm/llvm-project/pull/111109
More information about the llvm-commits
mailing list