[llvm] AMDGPU/GlobalISel: Switch some FP opcodes to extended LLTs (PR #212664)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 02:21:56 PDT 2026
================
@@ -1057,11 +1058,9 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
}
if (ST.hasVOP3PInsts())
- FPOpActions.clampMaxNumElementsStrict(0, S16, 2);
+ FPOpActions.clampMaxNumElementsStrict(0, F16, 2);
- FPOpActions
- .scalarize(0)
- .clampScalar(0, ST.has16BitInsts() ? S16 : S32, S64);
+ FPOpActions.scalarize(0).clampScalar(0, ST.has16BitInsts() ? F16 : F32, F64);
----------------
petar-avramovic wrote:
think `clampScalar(0, ST.has16BitInsts() ? F16 : F32, F64)` is not appropriate here. Only real action is for targets without 16bit instrs to `widen f16 to f32`.
There is no smaller type then f16 to widen to f16, and similarly no larger type then f64 to narrow to f64
https://github.com/llvm/llvm-project/pull/212664
More information about the llvm-commits
mailing list