Commit 2da56cf
authored
AMDGPU: Make v2f32 -> v2f16 legal when target supports v_cvt_pk_f16_f32 (llvm#139956) (llvm#2478)
If targets support v_cvt_pk_f16_f32 instruction, v2f32 -> v2f16 should
be legal. However, SelectionDAG does not allow us to specify the source
type in the legalization rules. To workaround this, we make FP_ROUND
Custom for v2f16 then set up v2f32 -> v2f16 to be legal during custom
lowering.
Cherry-pick llvm#139956 to mainline
(after bulk promotion)
Fixes: SWDEV-532608 -- expected v_cvt_pk_f16_f32 was not generated.1 parent 4f49035 commit 2da56cf
File tree
3 files changed
+219
-215
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU
3 files changed
+219
-215
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
919 | 922 | | |
920 | 923 | | |
921 | 924 | | |
| |||
6807 | 6810 | | |
6808 | 6811 | | |
6809 | 6812 | | |
| 6813 | + | |
| 6814 | + | |
| 6815 | + | |
| 6816 | + | |
| 6817 | + | |
| 6818 | + | |
| 6819 | + | |
| 6820 | + | |
| 6821 | + | |
6810 | 6822 | | |
6811 | 6823 | | |
6812 | 6824 | | |
6813 | | - | |
6814 | | - | |
6815 | 6825 | | |
6816 | 6826 | | |
6817 | 6827 | | |
| |||
This file was deleted.
0 commit comments