Files
llvm-project/llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
Vedant Neve 4b4aa3b791 [DAG] Add funnel-shift matchers to SDPatternMatch (Fixes #185880) (#186593)
Add new SelectionDAG pattern matchers for funnel shifts:
- m_FShL and m_FShR as ternary wrappers for ISD::FSHL/ISD::FSHR
- m_FShLLike and m_FShRLike to match:
-- direct FSHL/FSHR nodes
-- ROTL/ROTR equivalents (binding both X and Y to the same rotate operand)
-- OR(SHL(X, C), SRL(Y, BW - C)) forms (including commuted OR)

Also add unit tests covering positive and negative cases for:
- direct funnel-shif matching
- rotate equivalence matching
- OR-based funnel-shift-like patterns

Fixes #185880
2026-04-14 07:42:06 +00:00

77 KiB