xref: /llvm-project/llvm/test/CodeGen/X86/xray-multiplerets-in-blocks.mir (revision e6cdef187ed37468c14c53723c58cbde3e1341db)
1# RUN: llc -run-pass=xray-instrumentation -mtriple=x86_64-unknown-linux-gnu -o - %s | FileCheck %s
2#
3# Make sure we can handle multiple ret instructions in a single basic block for
4# XRay.
5
6--- |
7
8  define i32 @foo() noinline uwtable "function-instrument"="xray-always" {
9    ret i32 0
10    ret i32 1
11  }
12
13...
14
15---
16name: foo
17tracksRegLiveness: true
18liveins:
19  - { reg: '$edi'}
20body:            |
21  bb.0:
22    liveins: $edi
23    ; CHECK: PATCHABLE_FUNCTION_ENTER
24    RET64
25    ; CHECK-NEXT: PATCHABLE_RET
26    RET64
27    ; CHECK-NEXT: PATCHABLE_RET
28...
29