[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 14 09:20:20 PST 2024


================
@@ -25008,6 +25008,16 @@ void AArch64TargetLowering::ReplaceNodeResults(
       Results.push_back(
           LowerToPredicatedOp(SDValue(N, 0), DAG, AArch64ISD::MULHU_PRED));
     return;
+  case ISD::FP_ROUND: {
----------------
davemgreen wrote:

It is.. a very old bit of the code that probably would be better if it worked differently. But I'm not sure if it's easy to change.

I believe it comes from AArch64TargetLowering::LowerBITCAST? Could that function behave differently, or could the ISD::BITCAST be not marked Custom with no-fp?

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


More information about the llvm-commits mailing list