• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=aarch64 -mattr=+mte | FileCheck %s
2
3define i8* @irg_imm16(i8* %p) {
4entry:
5; CHECK-LABEL: irg_imm16:
6; CHECK: mov w[[R:[0-9]+]], #16
7; CHECK: irg x0, x0, x[[R]]
8; CHECK: ret
9  %q = call i8* @llvm.aarch64.irg(i8* %p, i64 16)
10  ret i8* %q
11}
12
13define i8* @irg_imm0(i8* %p) {
14entry:
15; CHECK-LABEL: irg_imm0:
16; CHECK: irg x0, x0{{$}}
17; CHECK: ret
18  %q = call i8* @llvm.aarch64.irg(i8* %p, i64 0)
19  ret i8* %q
20}
21
22define i8* @irg_reg(i8* %p, i64 %ex) {
23entry:
24; CHECK-LABEL: irg_reg:
25; CHECK: irg x0, x0, x1
26; CHECK: ret
27  %q = call i8* @llvm.aarch64.irg(i8* %p, i64 %ex)
28  ret i8* %q
29}
30
31; undef argument in irg is treated specially
32define i8* @irg_sp() {
33entry:
34; CHECK-LABEL: irg_sp:
35; CHECK: irg x0, sp{{$}}
36; CHECK: ret
37  %q = call i8* @llvm.aarch64.irg.sp(i64 0)
38  ret i8* %q
39}
40
41declare i8* @llvm.aarch64.irg(i8* %p, i64 %exclude)
42declare i8* @llvm.aarch64.irg.sp(i64 %exclude)
43