[llvm] AMDGPU: Make v2f64 -> v2f16 conversion Legal only when unsafe fast math is set (PR #134738)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 11:07:25 PDT 2025
================
@@ -1053,10 +1053,10 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
}
auto &FPTruncActions = getActionDefinitionsBuilder(G_FPTRUNC);
- if (ST.hasCvtPkF16F32Inst())
- FPTruncActions.legalFor(
- {{S32, S64}, {S16, S32}, {V2S16, V2S32}, {V2S16, V2S64}});
- else
+ if (ST.hasCvtPkF16F32Inst()) {
+ FPTruncActions.legalFor({{S32, S64}, {S16, S32}, {V2S16, V2S32}})
+ .customFor({V2S16, V2S64});
----------------
changpeng wrote:
> It's suspect that we need custom handling for the v2 case, but not the regular scalar
Previously only v2f16 was made Legal in order to generate v_cvt_pk_f16_f32, I think.
https://github.com/llvm/llvm-project/pull/134738
More information about the llvm-commits
mailing list