Skip to content

Commit 51fff11

Browse files
author
Benson Chu
committed
Review comments
1 parent 141270c commit 51fff11

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
8181
: CSR_AAPCS_SwiftTail_SaveList);
8282
} else if (F.hasFnAttribute("interrupt")) {
8383

84-
// Don't bother saving the floating point registers if target is not hard
85-
// float. This will prevent the Thumb1FrameLowering (cortex-m0) from
86-
// crashing due to an llvm_unreachable being triggered when a D-class
87-
// register is in the calling convention.
88-
if (STI.isTargetHardFloat() && F.hasFnAttribute("save-fp")) {
84+
// Don't bother saving the floating point registers if target does not have
85+
// floating point registers. This will prevent the Thumb1FrameLowering
86+
// (cortex-m0) from crashing due to an llvm_unreachable being triggered when
87+
// a D-class register is in the calling convention.
88+
if (STI.hasFPRegs() && F.hasFnAttribute("save-fp")) {
8989
bool HasNEON = STI.hasNEON();
9090

9191
if (STI.isMClass()) {

0 commit comments

Comments
 (0)