blob: ca05cf40bf26faf8bffcc4fc144b6a78bd88927f [file] [log] [blame]
Krzysztof Parzyszek046090d2018-03-12 14:01:28 +00001; RUN: llc -march=hexagon -spill-func-threshold-Os=0 -spill-func-threshold=0 < %s | FileCheck %s
2
3; Check that the long-calls feature handles save and restore.
4; CHECK: call ##__save
5; CHECK: jump ##__restore
6
7target triple = "hexagon"
8
9; Function Attrs: nounwind
10define i32 @f0(i32 %a0, i32 %a1, i32 %a2) #0 {
11b0:
12 %v0 = tail call i32 bitcast (i32 (...)* @f1 to i32 (i32, i32, i32)*)(i32 %a0, i32 %a1, i32 %a2) #1
13 %v1 = tail call i32 bitcast (i32 (...)* @f2 to i32 (i32, i32, i32)*)(i32 %a0, i32 %a1, i32 %a2) #1
14 ret i32 0
15}
16
17; Function Attrs: nounwind
18declare i32 @f1(...) #1
19
20; Function Attrs: nounwind
21declare i32 @f2(...) #1
22
23attributes #0 = { nounwind "target-features"="+long-calls" }
24attributes #1 = { nounwind }