diff options
author | Jessica Paquette <jpaquette@apple.com> | 2022-10-07 12:19:33 -0700 |
---|---|---|
committer | Jessica Paquette <jpaquette@apple.com> | 2022-10-07 20:06:13 -0700 |
commit | 45b9c6b01f263d087a456b098b36e9ee90c607b2 (patch) | |
tree | 1fb109f9916afd1a5fec590b2ee3819263858005 /clang/lib/Sema/SemaModule.cpp | |
parent | 9e80add2cfa9bb03bbe77cca9adec18137204538 (diff) | |
download | llvm-45b9c6b01f263d087a456b098b36e9ee90c607b2.zip llvm-45b9c6b01f263d087a456b098b36e9ee90c607b2.tar.gz llvm-45b9c6b01f263d087a456b098b36e9ee90c607b2.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions