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

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 02:44:57 PDT 2015


rengolin accepted this revision.
rengolin added a comment.
This revision is now accepted and ready to land.

In http://reviews.llvm.org/D12733#243549, @ab wrote:

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


Looks ok to me too, with your comments.

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


Sounds like a good plan.

Thanks!


================
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");
+  }
----------------
ab wrote:
> 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.
Good point, I think we should.

================
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:
----------------
ab wrote:
> What about adding a common shared prefix, say --check-prefix=CHECK-ALL or =CHECK, to simplify the -LABELs ?
Yes, you can use CHECK-LABEL for all of them.


Repository:
  rL LLVM

http://reviews.llvm.org/D12733





More information about the llvm-commits mailing list