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(i64* nocapture %x) "target-features"="+mte" {
8  entry:
9    store i64 1, i64* %x, align 8
10    %0 = tail call i8* @llvm.aarch64.irg(i8* null, i64 0)
11    %1 = tail call i8* @llvm.aarch64.irg.sp(i64 0)
12    %arrayidx1 = getelementptr inbounds i64, i64* %x, i64 1
13    store i64 1, i64* %arrayidx1, align 8
14    ret void
15  }
16
17  declare i8* @llvm.aarch64.irg(i8*, i64) nounwind
18  declare i8* @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, renamable $x9, renamable $x0, 0
66
67    STRXui renamable $x9, renamable $x0, 0 :: (store 8 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 8 into %ir.arrayidx1)
71    RET undef $lr
72
73...
74