[all-commits] [llvm/llvm-project] 4b4aa3: [DAG] Add funnel-shift matchers to SDPatternMatch ...

Vedant Neve via All-commits all-commits at lists.llvm.org
Tue Apr 14 00:42:29 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b4aa3b7911dcf5cda2cd166e39b8d5d97c20183
      https://github.com/llvm/llvm-project/commit/4b4aa3b7911dcf5cda2cd166e39b8d5d97c20183
  Author: Vedant Neve <vedantneve13 at gmail.com>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M llvm/include/llvm/CodeGen/SDPatternMatch.h
    M llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list