llvm/llvm-project

[DAG] SDPatternMatch - add m_BinOp/m_c_BinOp variants driven by TLI.isBinOp/isCommutativeBinOp

Open

#84,940 opened on Mar 12, 2024

View on GitHub
 (13 comments) (0 reactions) (1 assignee)C++ (10,782 forks)batch import
good first issuellvm:SelectionDAG

Repository metrics

Stars
 (26,378 stars)
PR merge metrics
 (Avg merge 1d 2h) (1,000 merged PRs in 30d)

Description

As noticed on #84759 - we should be able to allow folds to generally match any binary ops that are recognized by the TLI.isBinOp/isCommutativeBinOp callbacks, allowing us to match target binops in generic dag combines.

CC @mshockwave

Contributor guide