[llvm] [AArch64][CodeGen] Fix crash when fptrunc returns fp16 with +nofp attr (PR #81724)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 09:56:32 PST 2024


================
@@ -541,13 +541,18 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
   setOperationAction(ISD::STRICT_UINT_TO_FP, MVT::i32, Custom);
   setOperationAction(ISD::STRICT_UINT_TO_FP, MVT::i64, Custom);
   setOperationAction(ISD::STRICT_UINT_TO_FP, MVT::i128, Custom);
-  setOperationAction(ISD::FP_ROUND, MVT::f16, Custom);
----------------
davemgreen wrote:

I think this can be `if (Subtarget->hasFPARMv8()) setOperationAction(ISD::FP_ROUND, MVT::f16, Custom);`

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


More information about the llvm-commits mailing list