llvm-project/llvm/test/Transforms/SampleProfile/pseudo-probe-dangling.mir

28 lines
833 B
YAML

# REQUIRES: x86-registered-target
# Ensure llc can read and parse MIR pseudo probe operations.
# RUN: llc -mtriple x86_64-- -run-pass=pseudo-probe-inserter %s -o - | FileCheck %s
# CHECK: PSEUDO_PROBE 6699318081062747564, 1, 0, 0
# check probe 2 is moved before the test instruction.
# CHECK: PSEUDO_PROBE 6699318081062747564, 2, 0, 0
# CHECK: TEST32rr
# check probe 3 is dangling.
# CHECK: PSEUDO_PROBE 6699318081062747564, 3, 0, 2
name: foo
body: |
bb.0:
TEST32rr killed renamable $edi, renamable $edi, implicit-def $eflags
PSEUDO_PROBE 6699318081062747564, 1, 0, 0
JCC_1 %bb.1, 4, implicit $eflags
bb.2:
TEST32rr killed renamable $edi, renamable $edi, implicit-def $eflags
PSEUDO_PROBE 6699318081062747564, 2, 0, 0
bb.1:
PSEUDO_PROBE 6699318081062747564, 3, 0, 0
...