Commit e73c264
committed
[DAG] shouldReduceLoadWidth - hasOneUse check for just be for the loaded value, not the chain etc.
The hasOneUse check was failing in any case where the load was part of a chain - we should only be checking if the loaded value has one use, and any updates to the chain should be handled by the fold calling shouldReduceLoadWidth.
I've updated the x86 implementation to match, although it has no effect here yet (I'm still looking at how to improve the x86 implementation) as the inner for loop was discarding chain uses anyway.
By using hasNUsesOfValue instead this patch exposes a missing dependency on the LLVMSelectionDAG library in a lot of tools + unittests, we can either update the CMakeLists.txt dependencies or make SDNode::hasNUsesOfValue inline - no string opinions on this tbh.
Noticed while fighting the x86 regressions in llvm#1226711 parent 02c804d commit e73c264
File tree
18 files changed
+225
-386
lines changed- llvm
- include/llvm/CodeGen
- lib/Target/X86
- test/CodeGen
- AArch64
- AMDGPU
- ARM
- RISCV/rvv
- tools
- llvm-extract
- llvm-reduce
- unittests
- Analysis
- Frontend
- IR
- Transforms
- Coroutines
- Instrumentation
- Scalar
- Utils
18 files changed
+225
-386
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1817 | 1817 | | |
1818 | 1818 | | |
1819 | 1819 | | |
1820 | | - | |
| 1820 | + | |
1821 | 1821 | | |
1822 | 1822 | | |
1823 | 1823 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3260 | 3260 | | |
3261 | 3261 | | |
3262 | 3262 | | |
3263 | | - | |
| 3263 | + | |
| 3264 | + | |
3264 | 3265 | | |
3265 | 3266 | | |
3266 | 3267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
578 | 576 | | |
579 | | - | |
580 | | - | |
581 | | - | |
| 577 | + | |
582 | 578 | | |
583 | 579 | | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
592 | 588 | | |
| 589 | + | |
| 590 | + | |
593 | 591 | | |
594 | | - | |
| 592 | + | |
595 | 593 | | |
596 | 594 | | |
597 | 595 | | |
| |||
604 | 602 | | |
605 | 603 | | |
606 | 604 | | |
| 605 | + | |
607 | 606 | | |
608 | 607 | | |
609 | 608 | | |
| |||
0 commit comments