2016-04-11 23:24:23 +08:00
|
|
|
; RUN: llc -march=mipsel -disable-mips-delay-filler -relocation-model=pic < %s | FileCheck %s
|
2012-12-13 11:17:29 +08:00
|
|
|
|
|
|
|
@g = external global i32
|
|
|
|
|
2013-03-05 06:25:01 +08:00
|
|
|
; CHECK: move $gp
|
2012-12-13 11:17:29 +08:00
|
|
|
; CHECK: jalr $25
|
|
|
|
; CHECK: nop
|
2013-03-05 06:25:01 +08:00
|
|
|
; CHECK-NOT: move $gp
|
2012-12-13 11:17:29 +08:00
|
|
|
; CHECK: jalr $25
|
|
|
|
|
|
|
|
define void @f0() nounwind {
|
|
|
|
entry:
|
|
|
|
tail call void @externalFunc() nounwind
|
|
|
|
tail call fastcc void @internalFunc()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @externalFunc()
|
|
|
|
|
|
|
|
define internal fastcc void @internalFunc() nounwind noinline {
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load i32, i32* @g, align 4
|
2012-12-13 11:17:29 +08:00
|
|
|
%inc = add nsw i32 %0, 1
|
|
|
|
store i32 %inc, i32* @g, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 16:22:21 +08:00
|
|
|
define void @no_lazy(void (i32)* %pf) {
|
|
|
|
|
|
|
|
; CHECK-LABEL: no_lazy
|
|
|
|
; CHECK-NOT: gp_disp
|
|
|
|
|
|
|
|
tail call void %pf(i32 1)
|
|
|
|
ret void
|
|
|
|
}
|