[llvm] [AMDGPU] Optimize fsub and fneg when packed fp32 ops are supported (PR #195962)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 02:55:36 PDT 2026
================
@@ -1134,6 +1134,9 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
.lowerFor({S64, S16, V2S16});
}
+ if (ST.hasPackedFP32Ops())
+ FSubActions.lowerFor({V2S32}).clampMaxNumElements(0, S32, 2);
----------------
arsenm wrote:
Why don't we have the element clamp for the legal v2f16 case
https://github.com/llvm/llvm-project/pull/195962
More information about the llvm-commits
mailing list