Don't generate libcalls for wide shift on Windows ARM (PR42711)

The previous patch (cff90f07cb) didn't
cover ARM.
This commit is contained in:
Hans Wennborg 2020-02-25 11:50:03 +01:00
parent 7a7eacc797
commit decd021fac
2 changed files with 8 additions and 2 deletions

View File

@ -17222,7 +17222,7 @@ bool ARMTargetLowering::isCheapToSpeculateCtlz() const {
}
bool ARMTargetLowering::shouldExpandShift(SelectionDAG &DAG, SDNode *N) const {
return !Subtarget->hasMinSize();
return !Subtarget->hasMinSize() || Subtarget->isTargetWindows();
}
Value *ARMTargetLowering::emitLoadLinked(IRBuilder<> &Builder, Value *Addr,

View File

@ -1,4 +1,10 @@
; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s
; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s
; RUN: llc -mtriple=thumbv7-windows %s -o - | FileCheck %s -check-prefix=CHECK-WIN
; The Windows runtime doesn't have these.
; CHECK-WIN-NOT: __ashldi3
; CHECK-WIN-NOT: __ashrdi3
; CHECK-WIN-NOT: __lshrdi3
define i64 @f0(i64 %val, i64 %amt) minsize optsize {
; CHECK-LABEL: f0: