Commit fdf996f
[AMDGPU] Fix op_sel settings for v_cvt_scale32_* and v_cvt_sr_* (llvm#151286)
For OPF_OPSEL_SRCBYTE: Vector instruction uses OPSEL[1:0] to specify a
byte
select for the first source operand. So op_sel [0, 0], [1, 0], [0, 1]
and [1, 1] should map
to byte 0, 1, 2 and 3, respectively.
For OPF_OPSEL_DSTBYTE: OPSEL is used as a destination byte select.
OPSEL[2:3]
specify which byte of the destination to write to. Note that the order
of the bits is different
from that of OPF_OPSEL_SRCBYT. So the mapping should be: op_sel [0, 0],
[0, 1], [1, 0]
and [1, 1] map to byte 0, 1, 2 and 3, respectively.
Fixes: SWDEV-5449011 parent 8357ccc commit fdf996f
File tree
5 files changed
+78
-77
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU
5 files changed
+78
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6675 | 6675 | | |
6676 | 6676 | | |
6677 | 6677 | | |
6678 | | - | |
| 6678 | + | |
6679 | 6679 | | |
6680 | 6680 | | |
6681 | 6681 | | |
6682 | 6682 | | |
6683 | 6683 | | |
6684 | | - | |
| 6684 | + | |
6685 | 6685 | | |
6686 | 6686 | | |
6687 | 6687 | | |
| |||
6690 | 6690 | | |
6691 | 6691 | | |
6692 | 6692 | | |
6693 | | - | |
| 6693 | + | |
6694 | 6694 | | |
6695 | 6695 | | |
6696 | 6696 | | |
6697 | 6697 | | |
6698 | 6698 | | |
6699 | | - | |
| 6699 | + | |
6700 | 6700 | | |
6701 | 6701 | | |
6702 | 6702 | | |
| |||
6719 | 6719 | | |
6720 | 6720 | | |
6721 | 6721 | | |
6722 | | - | |
| 6722 | + | |
6723 | 6723 | | |
6724 | 6724 | | |
6725 | 6725 | | |
6726 | 6726 | | |
6727 | 6727 | | |
6728 | | - | |
6729 | | - | |
| 6728 | + | |
| 6729 | + | |
| 6730 | + | |
6730 | 6731 | | |
6731 | 6732 | | |
6732 | 6733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
975 | | - | |
976 | | - | |
| 975 | + | |
| 976 | + | |
977 | 977 | | |
978 | | - | |
| 978 | + | |
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
1022 | | - | |
| 1022 | + | |
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
| |||
0 commit comments