Akira Hatanaka | ed185da | 2012-12-13 03:17:29 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=mipsel -disable-mips-delay-filler < %s | FileCheck %s |
| 2 | |
| 3 | @g = external global i32 |
| 4 | |
Akira Hatanaka | 1ae08e0 | 2013-03-04 22:25:01 +0000 | [diff] [blame^] | 5 | ; CHECK: move $gp |
Akira Hatanaka | ed185da | 2012-12-13 03:17:29 +0000 | [diff] [blame] | 6 | ; CHECK: jalr $25 |
| 7 | ; CHECK: nop |
Akira Hatanaka | 1ae08e0 | 2013-03-04 22:25:01 +0000 | [diff] [blame^] | 8 | ; CHECK-NOT: move $gp |
Akira Hatanaka | ed185da | 2012-12-13 03:17:29 +0000 | [diff] [blame] | 9 | ; CHECK: jalr $25 |
| 10 | |
| 11 | define void @f0() nounwind { |
| 12 | entry: |
| 13 | tail call void @externalFunc() nounwind |
| 14 | tail call fastcc void @internalFunc() |
| 15 | ret void |
| 16 | } |
| 17 | |
| 18 | declare void @externalFunc() |
| 19 | |
| 20 | define internal fastcc void @internalFunc() nounwind noinline { |
| 21 | entry: |
| 22 | %0 = load i32* @g, align 4 |
| 23 | %inc = add nsw i32 %0, 1 |
| 24 | store i32 %inc, i32* @g, align 4 |
| 25 | ret void |
| 26 | } |
| 27 | |