Krzysztof Parzyszek | a750383 | 2017-05-02 18:15:33 +0000 | [diff] [blame] | 1 | ; 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 | |
| 10 | target triple = "hexagon" |
| 11 | |
| 12 | @_ZL13g_usr1_called = internal thread_local global i32 0, align 4 |
| 13 | |
| 14 | ; Function Attrs: norecurse nounwind |
| 15 | define void @_Z14SigUsr1Handleri(i32) local_unnamed_addr #0 { |
| 16 | entry: |
| 17 | store volatile i32 1, i32* @_ZL13g_usr1_called, align 4 |
| 18 | ret void |
| 19 | } |
| 20 | |
| 21 | ; Function Attrs: norecurse nounwind |
| 22 | define zeroext i1 @_Z27CheckForMonitorCancellationv() local_unnamed_addr #0 { |
| 23 | entry: |
| 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 | |
| 28 | if.then: ; preds = %entry |
| 29 | store volatile i32 0, i32* @_ZL13g_usr1_called, align 4 |
| 30 | br label %return |
| 31 | |
| 32 | return: ; preds = %entry, %if.then |
| 33 | %.sink = phi i1 [ true, %if.then ], [ false, %entry ] |
| 34 | ret i1 %.sink |
| 35 | } |
| 36 | |
Sumanth Gundapaneni | e1983bc | 2017-10-18 18:07:07 +0000 | [diff] [blame] | 37 | attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" } |