[GlobalISel] Add commutative matchers for compares.
This adds: * `m_c_GICmp` * `m_c_GFCmp` These work the same way as the standard matchers, but will also try to commute the LHS and RHS of a compare to get a match. E.g. ``` m_c_GICmp(m_Pred(...), m_GAdd(...), m_GSub(...)) ``` Can match either of ``` icmp cc (add x, y), (sub a, b) icmp swapped_cc (sub a, b), (add x, y) ``` Differential Revision: https://reviews.llvm.org/D135415
Loading
Please sign in to comment