[llvm] AMDGPU: Make v2f64 -> v2f16 conversion Legal only when unsafe fast math is set (PR #134738)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 15:49:51 PDT 2025


================
@@ -915,7 +915,7 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
     setOperationAction(ISD::BUILD_VECTOR, MVT::v2bf16, Legal);
   }
 
-  if (Subtarget->hasCvtPkF16F32Inst()) {
+  if (Subtarget->hasCvtPkF16F32Inst() && TM.Options.UnsafeFPMath) {
     setOperationAction(ISD::FP_ROUND, MVT::v2f16, Legal);
----------------
rampitec wrote:

It disables it not just from v2f64, but also from v2f32, right? How is that lowered then?

https://github.com/llvm/llvm-project/pull/134738


More information about the llvm-commits mailing list