[ARM] More MVE compare vector splat combines for ANDs
[llvm-complete.git] / test / Transforms / RewriteStatepointsForGC / leaf-function.ll
blob5de85153e719ffa5e61a850a4085e8d4da998d2f
1 ; RUN: opt < %s -S -rewrite-statepoints-for-gc | FileCheck %s
2 ; RUN: opt < %s -S -passes=rewrite-statepoints-for-gc | FileCheck %s
4 declare void @foo() "gc-leaf-function"
5 declare void @bar()
7 ; Calls of functions with the "gc-leaf-function" attribute shouldn't be turned
8 ; into a safepoint.  An entry safepoint should get inserted, though.
9 define void @test_leaf_function() gc "statepoint-example" {
10 ; CHECK-LABEL: test_leaf_function
11 ; CHECK-NOT: gc.statepoint
12 ; CHECK-NOT: gc.result
13 entry:
14   call void @foo()
15   ret void
18 define void @test_leaf_function_call() gc "statepoint-example" {
19 ; CHECK-LABEL: test_leaf_function_call
20 ; CHECK-NOT: gc.statepoint
21 ; CHECK-NOT: gc.result
22 entry:
23   call void @bar() "gc-leaf-function"
24   ret void
27 ; This function is inlined when inserting a poll.
28 declare void @do_safepoint()
29 define void @gc.safepoint_poll() {
30 ; CHECK-LABEL: gc.safepoint_poll
31 entry:
32   call void @do_safepoint()
33   ret void