Robert Dazi
8837898b8d
[DAGCombine] Count leading ones: refine post DAG/Type Legalisation if promotion ( #102877 )
...
This PR is related to #99591 . In this PR, instead of modifying how the
legalisation occurs depending on surrounding instructions, we refine
after legalisation.
This PR has two parts:
* `SDPatternMatch/MatchContext`: Modify a little bit the code to match
Operands (used by `m_Node(...)`) and Unary/Binary/Ternary Patterns to
make it compatible with `VPMatchContext`, instead of only `m_Opc`
supported. Some tests were added to ensure no regressions.
* `DAGCombiner`: Add a `foldSubCtlzNot` which detect and rewrite the
patterns using matching context.
Remaining Tasks:
- [ ] GlobalISel
- [ ] Currently the pattern matching will occur even before
legalisation. Should I restrict it to specific stages instead ?
- [ ] Style: Add a visitVP_SUB ?? Move `foldSubCtlzNot` in another
location for style consistency purpose ?
@topperc
---------
Co-authored-by: v01dxyz <v01dxyz@v01d.xyz >
2024-09-15 15:48:36 +04:00
..
2024-09-10 16:52:21 +08:00
2024-09-10 09:28:15 +08:00
2024-08-19 15:23:05 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-06-03 13:23:35 +08:00
2024-05-14 20:23:04 +08:00
2024-07-22 15:10:21 +08:00
2024-09-06 16:19:20 +01:00
2024-06-03 13:23:35 +08:00
2024-05-14 20:23:04 +08:00
2024-08-08 23:05:38 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-08-08 23:05:38 +08:00
2024-06-12 22:02:47 +08:00
2024-08-19 15:23:05 +08:00
2024-07-30 14:22:53 +08:00
2024-05-14 20:23:04 +08:00
2024-07-23 15:14:20 +08:00
2024-09-15 15:48:36 +04:00
2024-09-06 15:46:43 +08:00
2024-08-08 23:05:38 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-16 17:15:21 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-06-12 17:41:26 +08:00
2024-05-14 20:23:04 +08:00
2024-07-30 14:22:53 +08:00
2024-08-09 14:08:32 +08:00
2024-08-08 23:05:38 +08:00
2024-09-13 08:49:54 +08:00
2024-08-15 14:09:36 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-08-08 23:05:38 +08:00
2024-08-08 23:05:38 +08:00
2024-08-08 23:05:38 +08:00
2024-08-30 16:38:42 +08:00
2024-08-08 23:05:38 +08:00
2024-05-14 20:23:04 +08:00
2024-08-08 23:05:38 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-06-07 15:39:05 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-06-07 15:39:05 +08:00
2024-06-12 22:02:47 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-17 09:13:51 +08:00
2024-05-14 20:23:04 +08:00
2024-08-08 23:05:38 +08:00
2024-05-14 20:23:04 +08:00
2024-08-30 16:38:42 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-08-29 17:53:32 +01:00
2024-08-29 17:53:32 +01:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-08-08 23:05:38 +08:00
2024-06-12 22:02:47 +08:00
2024-05-14 20:23:04 +08:00
2024-07-30 14:22:24 +08:00
2024-07-16 20:56:18 +01:00
2024-05-14 20:23:04 +08:00
2024-06-03 13:23:35 +08:00
2024-05-14 20:23:04 +08:00
2024-08-30 16:38:42 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-17 09:13:51 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-09-12 18:05:13 +08:00
2024-09-12 18:05:13 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-05-16 17:15:21 +08:00
2024-05-16 16:54:18 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00
2024-07-30 14:22:53 +08:00
2024-05-14 20:23:04 +08:00
2024-07-17 12:21:44 +08:00
2024-07-31 17:18:27 -07:00
2024-05-14 20:23:04 +08:00
2024-08-02 11:28:03 +08:00
2024-06-12 22:02:47 +08:00
2024-08-08 23:05:38 +08:00
2024-05-14 20:23:04 +08:00
2024-05-14 20:23:04 +08:00