xref: /llvm-project/llvm/test/CodeGen/AArch64/irg-nomem.mir (revision 1ee315ae7964c8433b772e0b5d667834994ba753)
1# RUN: llc -mtriple=aarch64-none-linux-android -run-pass aarch64-ldst-opt -o - %s | FileCheck %s
2
3--- |
4  target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5  target triple = "aarch64-unknown-linux-android"
6
7  define void @f(ptr nocapture %x) "target-features"="+mte" {
8  entry:
9    store i64 1, ptr %x, align 8
10    %0 = tail call ptr @llvm.aarch64.irg(ptr null, i64 0)
11    %1 = tail call ptr @llvm.aarch64.irg.sp(i64 0)
12    %arrayidx1 = getelementptr inbounds i64, ptr %x, i64 1
13    store i64 1, ptr %arrayidx1, align 8
14    ret void
15  }
16
17  declare ptr @llvm.aarch64.irg(ptr, i64) nounwind
18  declare ptr @llvm.aarch64.irg.sp(i64) nounwind
19...
20---
21name:            f
22alignment:       4
23exposesReturnsTwice: false
24legalized:       false
25regBankSelected: false
26selected:        false
27failedISel:      false
28tracksRegLiveness: true
29hasWinCFI:       false
30registers:       []
31liveins:
32  - { reg: '$x0', virtual-reg: '' }
33frameInfo:
34  isFrameAddressTaken: false
35  isReturnAddressTaken: false
36  hasStackMap:     false
37  hasPatchPoint:   false
38  stackSize:       0
39  offsetAdjustment: 0
40  maxAlignment:    0
41  adjustsStack:    false
42  hasCalls:        false
43  stackProtector:  ''
44  maxCallFrameSize: 0
45  cvBytesOfCalleeSavedRegisters: 0
46  hasOpaqueSPAdjustment: false
47  hasVAStart:      false
48  hasMustTailInVarArgFunc: false
49  localFrameSize:  0
50  savePoint:       ''
51  restorePoint:    ''
52fixedStack:      []
53stack:           []
54callSites:       []
55constants:       []
56machineFunctionInfo: {}
57body:             |
58  bb.0.entry:
59    liveins: $x0
60
61    $x8 = ORRXrs $xzr, $xzr, 0
62    $w9 = MOVZWi 1, 0, implicit-def $x9
63
64    ; Check that stores are merged across IRG.
65    ; CHECK: STPXi renamable $x9, killed renamable $x9, renamable $x0, 0
66
67    STRXui renamable $x9, renamable $x0, 0 :: (store (s64) into %ir.x)
68    dead renamable $x10 = IRG renamable $x8, $xzr
69    dead renamable $x8 = IRG $sp, $xzr
70    STRXui killed renamable $x9, killed renamable $x0, 1 :: (store (s64) into %ir.arrayidx1)
71    RET undef $lr
72
73...
74