forked from OSchip/llvm-project
[AArch64] Don't generate libcalls for wide shifts on Darwin
Similar to cff90f07cb
.
Darwin doesn't always use compiler-rt, and so we can't assume that these
functions are available (at least on arm64).
This commit is contained in:
parent
1b8c84b8dd
commit
ceb801612a
|
@ -13102,7 +13102,7 @@ bool AArch64TargetLowering::
|
|||
bool AArch64TargetLowering::shouldExpandShift(SelectionDAG &DAG,
|
||||
SDNode *N) const {
|
||||
if (DAG.getMachineFunction().getFunction().hasMinSize() &&
|
||||
!Subtarget->isTargetWindows())
|
||||
!Subtarget->isTargetWindows() && !Subtarget->isTargetDarwin())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=aarch64-unknown-unknown | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=aarch64-windows | FileCheck %s -check-prefix=CHECK-WIN
|
||||
; RUN: llc < %s -mtriple=aarch64-apple-darwin | FileCheck %s -check-prefix=CHECK-DARWIN
|
||||
|
||||
; The Windows runtime doesn't have these.
|
||||
; CHECK-WIN-NOT: __ashlti3
|
||||
; CHECK-WIN-NOT: __ashrti3
|
||||
|
||||
; Darwin compiler-rt excludes these.
|
||||
; CHECK-DARWIN-NOT: __ashlti3
|
||||
; CHECK-DARWIN-NOT: __ashrti3
|
||||
|
||||
define i64 @f0(i64 %val, i64 %amt) minsize optsize {
|
||||
; CHECK-LABEL: f0:
|
||||
; CHECK: // %bb.0:
|
||||
|
|
Loading…
Reference in New Issue