[llvm] [AMDGPU] Make direct f16 <-> i32 conversion illegal (PR #205565)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 07:11:05 PDT 2026


================
@@ -3897,7 +3879,7 @@ SDValue AMDGPUTargetLowering::LowerFP_TO_INT(const SDValue Op,
   if (SrcVT == MVT::f16 && DestVT == MVT::i16)
     return Op;
 
-  if (SrcVT == MVT::bf16) {
+  if (SrcVT == MVT::bf16 || (SrcVT == MVT::f16 && DestVT == MVT::i32)) {
----------------
jayfoad wrote:

Is there a good reason why the conditions for f16 and bf16 are not identical here?

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


More information about the llvm-commits mailing list