Commit 4d9a7fa
authored
[VPlan] Remove dead recipes before simplifying blends (#157622)
In simplifyBlends, when normalizing a blend recipe, the first mask that
is used only by the blend and is not all-false is chosen, and its
corresponding incoming value becomes the initial value, with the others
blended into it. At the same time, the mask that is chosen can be
eliminated. However, a multi-user mask might be used by a dead recipe,
which prevents this optimization. This patch moves removeDeadRecipes
before simplifyBlends to eliminate dead recipes, allowing simplifyBlends
to remove more dead masks.1 parent 4621e17 commit 4d9a7fa
File tree
3 files changed
+5
-13
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoopVectorize
3 files changed
+5
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2215 | 2215 | | |
2216 | 2216 | | |
2217 | 2217 | | |
2218 | | - | |
2219 | 2218 | | |
| 2219 | + | |
2220 | 2220 | | |
2221 | 2221 | | |
2222 | 2222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
566 | | - | |
567 | | - | |
| 565 | + | |
568 | 566 | | |
569 | 567 | | |
570 | 568 | | |
| |||
642 | 640 | | |
643 | 641 | | |
644 | 642 | | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
| 643 | + | |
| 644 | + | |
651 | 645 | | |
652 | 646 | | |
653 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | | - | |
| 377 | + | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
| |||
0 commit comments