[llvm] [AMDGPU][SDAG] Support source modifiers on select integer operands (PR #147325)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 09:01:28 PDT 2025
================
@@ -4864,12 +4910,28 @@ SDValue AMDGPUTargetLowering::performSelectCombine(SDNode *N,
}
if (VT == MVT::f32 && Subtarget->hasFminFmaxLegacy()) {
- SDValue MinMax
- = combineFMinMaxLegacy(SDLoc(N), VT, LHS, RHS, True, False, CC, DCI);
+ SDValue MinMax =
+ combineFMinMaxLegacy(SDLoc(N), VT, LHS, RHS, True, False, CC, DCI);
// Revisit this node so we can catch min3/max3/med3 patterns.
- //DCI.AddToWorklist(MinMax.getNode());
+ // DCI.AddToWorklist(MinMax.getNode());
return MinMax;
}
+
+ // Support source modifiers on integer types.
+ if (VT == MVT::i32 || VT == MVT::v2i32 || VT == MVT::i64) {
+ SDValue SrcModTrue = getBitwiseToSrcModifierOp(True, DCI);
+ SDValue SrcModFalse = getBitwiseToSrcModifierOp(False, DCI);
+ if (SrcModTrue || SrcModFalse) {
+ SDLoc SL(N);
+ EVT FVT = getFloatVT(VT);
----------------
arsenm wrote:
This would just be SrcMod{True|False}.getValueType()?
https://github.com/llvm/llvm-project/pull/147325
More information about the llvm-commits
mailing list