2018-07-12 22:36:43 +08:00
|
|
|
# RUN: llc -verify-machineinstrs -run-pass xray-instrumentation -mtriple=x86_64-unknown-linux-gnu -o - %s | FileCheck %s
|
2016-08-31 13:20:08 +08:00
|
|
|
#
|
|
|
|
# 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:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$edi'}
|
2016-08-31 13:20:08 +08:00
|
|
|
body: |
|
|
|
|
bb.0:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $edi
|
2016-08-31 13:20:08 +08:00
|
|
|
; CHECK: PATCHABLE_FUNCTION_ENTER
|
|
|
|
RETQ
|
2016-09-01 05:24:02 +08:00
|
|
|
; CHECK-NEXT: PATCHABLE_RET
|
2016-08-31 13:20:08 +08:00
|
|
|
RETQ
|
2016-09-01 05:24:02 +08:00
|
|
|
; CHECK-NEXT: PATCHABLE_RET
|
2016-08-31 13:20:08 +08:00
|
|
|
...
|