Commit 1e6b6bf
committed
Add constrained fadd to FP operations
Constrained intrinsics are treated as regular intrinsicss from the
perspective of FP operand bundle mechanism, meaning they can have FP
operand bundles. The FP bundle API functions will report properties
based on the operand bundles rather than metadata arguments.
These hybrid entities are temporary objects that exist while both
alternative mechanisms remain available. Nevertheless, they can be
useful for development:
* They can represent FP instructions with bundles. For example, while
there is currently no intrinsic that directly represents 'fadd'
instruction (and bundles cannot be attached to a plain 'fadd' since it
is not a call), a corresponding constrained intrinsic call can
represent the operation while still carrying operand bundles.
* Constrained intrinsic with bundles can be assigned properties that
otherwise cannot be expressed, such as denormal behavior.
This change adds 'experimental.constrained.fadd' to the list of FP
operations, enabling creation of tests for denormal behavior. It also
modifies methods `getRoundingMode` and `getExceptionBehavior` so that
they report information from metadata arguments if bundles are absent.
This adjustment should help incorporating constrained intrinsics into
algorithms based on operand bundles.1 parent ad480e9 commit 1e6b6bf
File tree
3 files changed
+76
-0
lines changed- llvm
- include/llvm/IR
- lib/IR
- unittests/IR
3 files changed
+76
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
639 | 644 | | |
640 | 645 | | |
641 | 646 | | |
| |||
658 | 663 | | |
659 | 664 | | |
660 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
661 | 671 | | |
662 | 672 | | |
663 | 673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
665 | 730 | | |
666 | 731 | | |
667 | 732 | | |
| |||
0 commit comments