[llvm-branch-commits] [cfe-branch] r310393 - Merging r309263:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 8 11:34:26 PDT 2017
Author: hans
Date: Tue Aug 8 11:34:26 2017
New Revision: 310393
URL: http://llvm.org/viewvc/llvm-project?rev=310393&view=rev
Log:
Merging r309263:
------------------------------------------------------------------------
r309263 | psmith | 2017-07-27 03:43:53 -0700 (Thu, 27 Jul 2017) | 6 lines
[CodeGen][ARM] ARM runtime helper functions are not always soft-fp
Re-commit r309257 with less precise register checks in arm-float-helpers.c
test.
------------------------------------------------------------------------
Added:
cfe/branches/release_50/test/CodeGen/arm-float-helpers.c
- copied unchanged from r309263, cfe/trunk/test/CodeGen/arm-float-helpers.c
Modified:
cfe/branches/release_50/ (props changed)
cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp
cfe/branches/release_50/test/CodeGen/complex-math.c
Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 8 11:34:26 2017
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308824,308897,308996,309058,309112-309113,309226,309327,309382-309383,309488,309503,309523,309722,309752,309975,310057,310158,310191,310359
+/cfe/trunk:308455,308824,308897,308996,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309722,309752,309975,310057,310158,310191,310359
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp?rev=310393&r1=310392&r2=310393&view=diff
==============================================================================
--- cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp Tue Aug 8 11:34:26 2017
@@ -5573,17 +5573,14 @@ void ARMABIInfo::setCCs() {
// AAPCS apparently requires runtime support functions to be soft-float, but
// that's almost certainly for historic reasons (Thumb1 not supporting VFP
// most likely). It's more convenient for AAPCS16_VFP to be hard-float.
- switch (getABIKind()) {
- case APCS:
- case AAPCS16_VFP:
- if (abiCC != getLLVMDefaultCC())
+
+ // The Run-time ABI for the ARM Architecture section 4.1.2 requires
+ // AEABI-complying FP helper functions to use the base AAPCS.
+ // These AEABI functions are expanded in the ARM llvm backend, all the builtin
+ // support functions emitted by clang such as the _Complex helpers follow the
+ // abiCC.
+ if (abiCC != getLLVMDefaultCC())
BuiltinCC = abiCC;
- break;
- case AAPCS:
- case AAPCS_VFP:
- BuiltinCC = llvm::CallingConv::ARM_AAPCS;
- break;
- }
}
ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty,
Modified: cfe/branches/release_50/test/CodeGen/complex-math.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/CodeGen/complex-math.c?rev=310393&r1=310392&r2=310393&view=diff
==============================================================================
--- cfe/branches/release_50/test/CodeGen/complex-math.c (original)
+++ cfe/branches/release_50/test/CodeGen/complex-math.c Tue Aug 8 11:34:26 2017
@@ -2,7 +2,8 @@
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple x86_64-pc-win64 -o - | FileCheck %s --check-prefix=X86
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple i686-unknown-unknown -o - | FileCheck %s --check-prefix=X86
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple powerpc-unknown-unknown -o - | FileCheck %s --check-prefix=PPC
-// RUN: %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabihf -o - | FileCheck %s --check-prefix=ARM
+// RUN %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabi -o - | FileCheck %s --check-prefix=ARM
+// RUN: %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabihf -o - | FileCheck %s --check-prefix=ARMHF
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple thumbv7k-apple-watchos2.0 -o - -target-abi aapcs16 | FileCheck %s --check-prefix=ARM7K
float _Complex add_float_rr(float a, float b) {
@@ -476,8 +477,15 @@ _Bool ne_float_cc(float _Complex a, floa
// Check that the libcall will obtain proper calling convention on ARM
_Complex double foo(_Complex double a, _Complex double b) {
+ // These functions are not defined as floating point helper functions in
+ // Run-time ABI for the ARM architecture document so they must not always
+ // use the base AAPCS.
+
// ARM-LABEL: @foo(
- // ARM: call arm_aapcscc { double, double } @__muldc3
+ // ARM: call void { double, double } @__muldc3
+
+ // ARMHF-LABEL: @foo(
+ // ARMHF: call { double, double } @__muldc3
// ARM7K-LABEL: @foo(
// ARM7K: call { double, double } @__muldc3
More information about the llvm-branch-commits
mailing list