[llvm] [DAG]: Created method `m_SelectLike` to match `ISD::Select` and `ISD::VSelect` (PR #164069)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 18 07:29:09 PDT 2025
================
@@ -13856,12 +13857,13 @@ static SDValue tryToFoldExtendSelectLoad(SDNode *N, const TargetLowering &TLI,
Opcode == ISD::ANY_EXTEND) &&
"Expected EXTEND dag node in input!");
- if (!(N0->getOpcode() == ISD::SELECT || N0->getOpcode() == ISD::VSELECT) ||
- !N0.hasOneUse())
+ SDValue Cond, Op1, Op2;
+ if (!sd_match(N0,
+ m_SelectLike(m_Value(Cond), m_Value(Op1), m_Value(Op2))) ||
----------------
RKSimon wrote:
```suggestion
m_OneUse(m_SelectLike(m_Value(Cond), m_Value(Op1), m_Value(Op2))))
```
https://github.com/llvm/llvm-project/pull/164069
More information about the llvm-commits
mailing list