[PATCH] D12733: [ARM] Use correct half-precision functions in EABI mode

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 11:15:27 PDT 2015


ab added a comment.

Renato: Alright then, this mostly LGTM, but what do I know about ARM ABIs!  I'll let you have the final say.

Oliver: please make sure to commit the compiler-rt additions first.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:407-408
@@ +406,4 @@
+  if (Subtarget->isTargetAEABI()) {
+    setLibcallName(RTLIB::FPROUND_F32_F16, "__aeabi_f2h");
+    setLibcallName(RTLIB::FPEXT_F16_F32,   "__aeabi_h2f");
+  }
----------------
The same thing is done for f64->f16 when Subtarget->isAAPCS_ABI(), not isTargetAEABI().  Should we also set the f64 libcall here?

I don't think any runtime has a f16->f64 libcall though.

================
Comment at: test/CodeGen/ARM/fp16.ll:16-21
@@ -13,6 +15,8 @@
 define void @foo() nounwind {
-; CHECK-LABEL: foo:
+; CHECK-HARDFLOAT-EABI-LABEL: foo:
+; CHECK-HARDFLOAT-GNU-LABEL: foo:
 ; CHECK-FP16-LABEL: foo:
 ; CHECK-ARMV8-LABEL: foo:
-; CHECK-SOFTFLOAT-LABEL: foo:
+; CHECK-SOFTFLOAT-EABI-LABEL: foo:
+; CHECK-SOFTFLOAT-GNU-LABEL: foo:
 entry:
----------------
What about adding a common shared prefix, say --check-prefix=CHECK-ALL or =CHECK, to simplify the -LABELs ?


Repository:
  rL LLVM

http://reviews.llvm.org/D12733





More information about the llvm-commits mailing list