[llvm] [AMDGPU][SDAG] Support source modifiers as integer on select (PR #147325)
Chris Jackson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 08:14:48 PDT 2025
================
@@ -4864,12 +4920,24 @@ 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 as integer.
+ if (VT == MVT::i32 || VT == MVT::v2i32 || VT == MVT::i64) {
+ if (SDValue SrcMod = getBitwiseToSrcModifierOp(True, DCI)) {
----------------
chrisjbris wrote:
I'll refactor this and apply to each operand.
https://github.com/llvm/llvm-project/pull/147325
More information about the llvm-commits
mailing list