1 ; REQUIRES: x86_64-linux
2 ; RUN: llc -mtriple=x86_64-- -stop-after=peephole-opt -o - %s | FileCheck %s
4 define internal i32 @arc_compare() {
6 %0 = load i64, ptr undef, align 8
7 br i1 undef, label %return, label %if.end
9 if.end: ; preds = %entry
10 ; Chek a register copy has been sinked into the compare instruction.
11 ; CHECK: %[[#REG:]]:gr64 = IMPLICIT_DEF
12 ; CHECK-NOT: %[[#]]:gr64 = MOV64rm %[[#REG]]
13 ; CHECK: PSEUDO_PROBE 5116412291814990879, 3, 0, 0
14 ; CHECK: CMP64mr %[[#REG]], 1
15 call void @llvm.pseudoprobe(i64 5116412291814990879, i64 3, i32 0, i64 -1)
16 %cmp4 = icmp slt i64 %0, undef
17 br i1 %cmp4, label %return, label %if.end6
19 if.end6: ; preds = %if.end
20 call void @llvm.pseudoprobe(i64 5116412291814990879, i64 5, i32 0, i64 -1)
23 return: ; preds = %if.end6, %if.end, %entry
27 ; Function Attrs: inaccessiblememonly nounwind willreturn
28 declare void @llvm.pseudoprobe(i64, i64, i32, i64) #0
30 attributes #0 = { inaccessiblememonly nounwind willreturn }