[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
Tue Feb 20 00:13:06 PST 2024
================
@@ -0,0 +1,20 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc -mtriple=aarch64 -mattr=-fp-armv8 -o - %s | FileCheck %s
+
+define half @f2h(float %a) {
+; CHECK-LABEL: f2h:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT: .cfi_def_cfa_offset 16
+; CHECK-NEXT: .cfi_offset w30, -16
+; CHECK-NEXT: bl __gnu_f2h_ieee
+; CHECK-NEXT: and w0, w0, #0xffff
+; CHECK-NEXT: bl __gnu_h2f_ieee
+; CHECK-NEXT: bl __gnu_f2h_ieee
----------------
davemgreen wrote:
I haven't looked into the details, but any idea why there are 3 calls here now? I don't think it's wrong, just a bit odd.
https://github.com/llvm/llvm-project/pull/81724
More information about the llvm-commits
mailing list