File: pseudo-probe-peep.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-6~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,418,812 kB
  • sloc: cpp: 5,290,827; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,900; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,892; xml: 953; cs: 573; fortran: 539
file content (30 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (6)
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
29
30
; REQUIRES: x86_64-linux
; RUN: llc -mtriple=x86_64-- -stop-after=peephole-opt -o - %s | FileCheck %s

define internal i32 @arc_compare() {
entry:
  %0 = load i64, i64* undef, align 8
  br i1 undef, label %return, label %if.end

if.end:                                           ; preds = %entry
; Chek a register copy has been sinked into the compare instruction.
; CHECK: %[[#REG:]]:gr64 = IMPLICIT_DEF 
; CHECK-NOT: %[[#]]:gr64 = MOV64rm %[[#REG]]
; CHECK: PSEUDO_PROBE 5116412291814990879, 3, 0, 0
; CHECK: CMP64mr %[[#REG]], 1
  call void @llvm.pseudoprobe(i64 5116412291814990879, i64 3, i32 0, i64 -1)
  %cmp4 = icmp slt i64 %0, undef
  br i1 %cmp4, label %return, label %if.end6

if.end6:                                          ; preds = %if.end
  call void @llvm.pseudoprobe(i64 5116412291814990879, i64 5, i32 0, i64 -1)
  br label %return

return:                                           ; preds = %if.end6, %if.end, %entry
  ret i32 undef
}

; Function Attrs: inaccessiblememonly nounwind willreturn
declare void @llvm.pseudoprobe(i64, i64, i32, i64) #0

attributes #0 = { inaccessiblememonly nounwind willreturn }