From: Tim Northover Date: Tue, 29 Jul 2014 09:56:45 +0000 (+0000) Subject: ARM: add __aeabi_d2h for truncation on AEABI systems X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30ef915bb4fdcc815c673819563bf0e487367557;p=llvm ARM: add __aeabi_d2h for truncation on AEABI systems ARM does actually define the name for this conversion, so we should use it on "-eabi" platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214176 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 49ed02277e2..f10394a66d8 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -312,6 +312,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM) // Conversions between floating types. // RTABI chapter 4.1.2, Table 7 { RTLIB::FPROUND_F64_F32, "__aeabi_d2f", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID }, + { RTLIB::FPROUND_F64_F16, "__aeabi_d2h", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID }, { RTLIB::FPEXT_F32_F64, "__aeabi_f2d", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID }, // Integer to floating-point conversions. diff --git a/test/CodeGen/ARM/fp16.ll b/test/CodeGen/ARM/fp16.ll index 501c2ba40ff..93cf2f4b1aa 100644 --- a/test/CodeGen/ARM/fp16.ll +++ b/test/CodeGen/ARM/fp16.ll @@ -73,7 +73,7 @@ define arm_aapcs_vfpcc i16 @test_to_fp16(double %in) { ; CHECK-ARMV8: vcvtb.f16.f64 [[TMP:s[0-9]+]], d0 ; CHECK-ARMV8: vmov r0, [[TMP]] -; CHECK-SOFTFLOAT: bl __truncdfhf2 +; CHECK-SOFTFLOAT: bl __aeabi_d2h ret i16 %val }