blob: d1d97a62263cdab25eb48b76e4f9ce5339ea3cfd [file] [log] [blame]
Krzysztof Parzyszeka7503832017-05-02 18:15:33 +00001; RUN: llc -march=hexagon -relocation-model=pic -mattr=+long-calls < %s | FileCheck --check-prefix=CHECK-LONG %s
2; RUN: llc -march=hexagon -relocation-model=pic < %s | FileCheck %s
3
4; CHECK-LONG: call ##_ZL13g_usr1_called@GDPLT
5; CHECK-LONG-NOT: call _ZL13g_usr1_called@GDPLT
6; CHECK: call _ZL13g_usr1_called@GDPLT
7; CHECK-NOT: call ##_ZL13g_usr1_called@GDPLT
8
9
10target triple = "hexagon"
11
12@_ZL13g_usr1_called = internal thread_local global i32 0, align 4
13
14; Function Attrs: norecurse nounwind
15define void @_Z14SigUsr1Handleri(i32) local_unnamed_addr #0 {
16entry:
17 store volatile i32 1, i32* @_ZL13g_usr1_called, align 4
18 ret void
19}
20
21; Function Attrs: norecurse nounwind
22define zeroext i1 @_Z27CheckForMonitorCancellationv() local_unnamed_addr #0 {
23entry:
24 %0 = load volatile i32, i32* @_ZL13g_usr1_called, align 4
25 %tobool = icmp eq i32 %0, 0
26 br i1 %tobool, label %return, label %if.then
27
28if.then: ; preds = %entry
29 store volatile i32 0, i32* @_ZL13g_usr1_called, align 4
30 br label %return
31
32return: ; preds = %entry, %if.then
33 %.sink = phi i1 [ true, %if.then ], [ false, %entry ]
34 ret i1 %.sink
35}
36
Sumanth Gundapanenie1983bc2017-10-18 18:07:07 +000037attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }