[PowerPC] Eliminate compares - add i32 sext/zext handling for SETULT/SETUGT
[llvm-core.git] / test / Transforms / RewriteStatepointsForGC / leaf-function.ll
blobe2350d4f9e0a29d624b49259c7a060b87bc2d493
1 ; RUN: opt < %s -S -rewrite-statepoints-for-gc | FileCheck %s
3 declare void @foo() "gc-leaf-function"
4 declare void @bar()
6 ; Calls of functions with the "gc-leaf-function" attribute shouldn't be turned
7 ; into a safepoint.  An entry safepoint should get inserted, though.
8 define void @test_leaf_function() gc "statepoint-example" {
9 ; CHECK-LABEL: test_leaf_function
10 ; CHECK-NOT: gc.statepoint
11 ; CHECK-NOT: gc.result
12 entry:
13   call void @foo()
14   ret void
17 define void @test_leaf_function_call() gc "statepoint-example" {
18 ; CHECK-LABEL: test_leaf_function_call
19 ; CHECK-NOT: gc.statepoint
20 ; CHECK-NOT: gc.result
21 entry:
22   call void @bar() "gc-leaf-function"
23   ret void
26 ; This function is inlined when inserting a poll.
27 declare void @do_safepoint()
28 define void @gc.safepoint_poll() {
29 ; CHECK-LABEL: gc.safepoint_poll
30 entry:
31   call void @do_safepoint()
32   ret void