Commit 16b362e
committed
[SelectionDAG][RISCV] Preserve nneg flag when folding (trunc (zext X))->(zext X).
If X is known non-negative, that's still true if we fold the truncate
to create a smaller zext.
In the 128 tests, SelectionDAGBuilder agressively truncates the
zext nneg to i64 to match getShiftAmountTy. If we don't preserve
the nneg we can't see that the shift amount argument be signext
mean we don't need to do any extension.1 parent ac62dbf commit 16b362e
File tree
3 files changed
+42
-38
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/RISCV
3 files changed
+42
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15740 | 15740 | | |
15741 | 15741 | | |
15742 | 15742 | | |
15743 | | - | |
15744 | | - | |
| 15743 | + | |
| 15744 | + | |
| 15745 | + | |
| 15746 | + | |
| 15747 | + | |
| 15748 | + | |
15745 | 15749 | | |
15746 | 15750 | | |
15747 | 15751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6474 | 6474 | | |
6475 | 6475 | | |
6476 | 6476 | | |
6477 | | - | |
6478 | | - | |
| 6477 | + | |
| 6478 | + | |
| 6479 | + | |
| 6480 | + | |
| 6481 | + | |
| 6482 | + | |
6479 | 6483 | | |
6480 | 6484 | | |
6481 | 6485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
627 | 626 | | |
628 | | - | |
| 627 | + | |
629 | 628 | | |
630 | 629 | | |
631 | 630 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
636 | 635 | | |
637 | | - | |
638 | | - | |
639 | | - | |
| 636 | + | |
| 637 | + | |
640 | 638 | | |
641 | 639 | | |
642 | 640 | | |
| |||
692 | 690 | | |
693 | 691 | | |
694 | 692 | | |
695 | | - | |
696 | | - | |
697 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
698 | 696 | | |
699 | 697 | | |
700 | | - | |
701 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
702 | 701 | | |
703 | 702 | | |
704 | 703 | | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
710 | 708 | | |
711 | 709 | | |
712 | 710 | | |
| |||
761 | 759 | | |
762 | 760 | | |
763 | 761 | | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
768 | 765 | | |
769 | | - | |
| 766 | + | |
770 | 767 | | |
771 | 768 | | |
772 | 769 | | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
777 | 774 | | |
778 | | - | |
779 | | - | |
780 | | - | |
| 775 | + | |
| 776 | + | |
781 | 777 | | |
782 | 778 | | |
783 | 779 | | |
| |||
0 commit comments