1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -global-isel -O0 -mtriple=aarch64-- -stop-after=irtranslator -verify-machineinstrs -o - %s | FileCheck %s
4 define i64 @expect_i64(i64 %arg0) {
5 ; CHECK-LABEL: name: expect_i64
6 ; CHECK: bb.1 (%ir-block.0):
8 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
9 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
10 ; CHECK: $x0 = COPY [[COPY1]](s64)
11 ; CHECK: RET_ReallyLR implicit $x0
12 %expval = call i64 @llvm.expect.i64(i64 %arg0, i64 1)
16 define ptr @ptr_annotate(ptr %arg0, ptr %arg1, ptr %arg2, i32 %arg3) {
17 ; CHECK-LABEL: name: ptr_annotate
18 ; CHECK: bb.1 (%ir-block.0):
19 ; CHECK: liveins: $w3, $x0, $x1, $x2
20 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
21 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1
22 ; CHECK: [[COPY2:%[0-9]+]]:_(p0) = COPY $x2
23 ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
24 ; CHECK: [[COPY4:%[0-9]+]]:_(p0) = COPY [[COPY]](p0)
25 ; CHECK: $x0 = COPY [[COPY4]](p0)
26 ; CHECK: RET_ReallyLR implicit $x0
27 %call = call ptr @llvm.ptr.annotation.p0(ptr %arg0, ptr %arg1, ptr %arg2, i32 %arg3, ptr null)
31 @.str = private unnamed_addr constant [4 x i8] c"sth\00", section "llvm.metadata"
32 @.str1 = private unnamed_addr constant [4 x i8] c"t.c\00", section "llvm.metadata"
34 define i32 @annotation(i32 %a) {
35 ; CHECK-LABEL: name: annotation
36 ; CHECK: bb.1 (%ir-block.0):
38 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
39 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
40 ; CHECK: $w0 = COPY [[COPY1]](s32)
41 ; CHECK: RET_ReallyLR implicit $w0
42 %call = call i32 @llvm.annotation.i32(i32 %a, ptr @.str, ptr @.str1, i32 2)
46 define ptr @launder_invariant_group(ptr %p) {
47 ; CHECK-LABEL: name: launder_invariant_group
48 ; CHECK: bb.1 (%ir-block.0):
50 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
51 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY [[COPY]](p0)
52 ; CHECK: $x0 = COPY [[COPY1]](p0)
53 ; CHECK: RET_ReallyLR implicit $x0
54 %q = call ptr @llvm.launder.invariant.group.p0(ptr %p)
58 define ptr @strip_invariant_group(ptr %p) {
59 ; CHECK-LABEL: name: strip_invariant_group
60 ; CHECK: bb.1 (%ir-block.0):
62 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
63 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY [[COPY]](p0)
64 ; CHECK: $x0 = COPY [[COPY1]](p0)
65 ; CHECK: RET_ReallyLR implicit $x0
66 %q = call ptr @llvm.strip.invariant.group.p0(ptr %p)
70 declare i64 @llvm.expect.i64(i64, i64) #0
71 declare ptr @llvm.ptr.annotation.p0(ptr, ptr, ptr, i32, ptr) #1
72 declare i32 @llvm.annotation.i32(i32, ptr, ptr, i32) #1
73 declare ptr @llvm.launder.invariant.group.p0(ptr) #2
74 declare ptr @llvm.strip.invariant.group.p0(ptr) #3
76 attributes #0 = { nounwind readnone willreturn }
77 attributes #1 = { nounwind willreturn }
78 attributes #2 = { inaccessiblememonly nounwind speculatable willreturn }
79 attributes #3 = { nounwind readnone speculatable willreturn }