blob: ad42bb5eab61d076e231e8f4dfc499ac1c32de95 [file] [log] [blame]
Krzysztof Parzyszek046090d2018-03-12 14:01:28 +00001; RUN: llc -march=hexagon -print-machineinstrs=expand-isel-pseudos -o /dev/null 2>&1 < %s | FileCheck %s
2; REQUIRES: asserts
3
4; CHECK: J2_call @f1
5; CHECK: PS_call_nr @f2
6
7target triple = "hexagon"
8
9@g0 = external global i32
10
11; Function Attrs: nounwind
12define i32 @f0() #0 {
13b0:
14 %v0 = load i32, i32* @g0, align 4
15 %v1 = tail call i32 @f1(i32 %v0) #0
16 %v2 = icmp eq i32 %v1, 0
17 br i1 %v2, label %b1, label %b2
18
19b1: ; preds = %b0
20 tail call void @f2() #2
21 unreachable
22
23b2: ; preds = %b0
24 ret i32 0
25}
26
27declare i32 @f1(i32)
28
29; Function Attrs: noreturn
30declare void @f2() #1
31
32attributes #0 = { nounwind "disable-tail-calls"="true" }
33attributes #1 = { noreturn }
34attributes #2 = { noreturn nounwind }