llvm-project
1375ac20 - [AMDGPU] Make direct f16 <-> i32 conversion illegal (#205565)

Commit
79 days ago
[AMDGPU] Make direct f16 <-> i32 conversion illegal (#205565) Neither SALU nor VALU support direct conversion from f16 to/from i32. Previously, this was still legal and handled by instruction selection patterns, forming chains f16 -> f32 -> i32 and i32 -> f32 -> f16 for the two cases, respectively. This change marks the conversion illegal and creates the same chains as the pattern during (operation) legalization. This had the added benefit that a combination of FNEG and FPTOSI/UI can now merge the float negation into the source modifier of the f16-to-f32 conversion, as demonstrated by the GlobalISel tests. This fixes https://github.com/llvm/llvm-project/issues/177342. --------- Signed-off-by: Lukas Sommer <lukas.sommer@amd.com>
Author
Parents
Loading