[llvm] [DAG]: Created method `m_SelectLike` to match `ISD::Select` and `ISD::VSelect` (PR #164069)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 11:28:58 PDT 2025
================
@@ -13856,12 +13856,12 @@ 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_OneUse(m_SelectLike(m_Value(Cond), m_Value(Op1),
+ m_Value(Op2))))) {
return SDValue();
+ }
----------------
mshockwave wrote:
remove curly braces
https://github.com/llvm/llvm-project/pull/164069
More information about the llvm-commits
mailing list