Skip to content

Commit 5e17daf

Browse files
authored
Merge pull request #626 from ornata/apple/stable/20200108
[AArch64] Don't generate libcalls for wide shifts on Darwin
2 parents 529dac0 + 00fdb8e commit 5e17daf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13292,7 +13292,7 @@ bool AArch64TargetLowering::
1329213292
bool AArch64TargetLowering::shouldExpandShift(SelectionDAG &DAG,
1329313293
SDNode *N) const {
1329413294
if (DAG.getMachineFunction().getFunction().hasMinSize() &&
13295-
!Subtarget->isTargetWindows())
13295+
!Subtarget->isTargetWindows() && !Subtarget->isTargetDarwin())
1329613296
return false;
1329713297
return true;
1329813298
}

llvm/test/CodeGen/AArch64/shift_minsize.ll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
33
; RUN: llc < %s -mtriple=aarch64-windows | FileCheck %s -check-prefix=CHECK-WIN
4+
; RUN: llc < %s -mtriple=aarch64-apple-darwin | FileCheck %s -check-prefix=CHECK-DARWIN
45

56
; The Windows runtime doesn't have these.
67
; CHECK-WIN-NOT: __ashlti3
78
; CHECK-WIN-NOT: __ashrti3
89

10+
; Darwin compiler-rt excludes these.
11+
; CHECK-DARWIN-NOT: __ashlti3
12+
; CHECK-DARWIN-NOT: __ashrti3
13+
914
define i64 @f0(i64 %val, i64 %amt) minsize optsize {
1015
; CHECK-LABEL: f0:
1116
; CHECK: // %bb.0:

0 commit comments

Comments
 (0)