summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/xray-multiplerets-in-blocks.mir
blob: d8f08104a9e7f7a3c08289a1ed2a357f78558c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# RUN: llc -verify-machineinstrs -run-pass xray-instrumentation -mtriple=x86_64-unknown-linux-gnu -o - %s | FileCheck %s
#
# Make sure we can handle multiple ret instructions in a single basic block for
# XRay.

--- |

  define i32 @foo() noinline uwtable "function-instrument"="xray-always" {
    ret i32 0
    ret i32 1
  }

...

---
name: foo
tracksRegLiveness: true
liveins:
  - { reg: '$edi'}
body:            |
  bb.0:
    liveins: $edi
    ; CHECK: PATCHABLE_FUNCTION_ENTER
    RETQ
    ; CHECK-NEXT: PATCHABLE_RET
    RETQ
    ; CHECK-NEXT: PATCHABLE_RET
...
OpenPOWER on IntegriCloud