[all-commits] [llvm/llvm-project] 1375ac: [AMDGPU] Make direct f16 <-> i32 conversion illega...
Lukas Sommer via All-commits
all-commits at lists.llvm.org
Fri Jun 26 03:38:09 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1375ac2094aca2a4116e3094b5bb2f69b4018bd9
https://github.com/llvm/llvm-project/commit/1375ac2094aca2a4116e3094b5bb2f69b4018bd9
Author: Lukas Sommer <lukas.sommer at amd.com>
Date: 2026-06-26 (Fri, 26 Jun 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/AMDGPU/SOPInstructions.td
M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fptosi.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fptoui.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-sitofp.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-uitofp.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fpowi.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fptosi.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fptoui.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sitofp.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uitofp.mir
Log Message:
-----------
[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 at amd.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list