llvm/test/CodeGen/MIR/AArch64/target-flags.mir
Matthias Braun 3346c15107 llc: Add support for -run-pass none
This does not schedule any passes besides the ones necessary to
construct and print the machine function. This is useful to test .mir
file reading and printing.

Differential Revision: http://reviews.llvm.org/D22432

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275664 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-16 02:24:59 +00:00

40 lines
1.5 KiB
YAML

# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
--- |
@var_i32 = global i32 42
@var_i64 = global i64 0
define void @sub_small() {
entry:
%val32 = load i32, i32* @var_i32
%newval32 = sub i32 %val32, 4095
store i32 %newval32, i32* @var_i32
%val64 = load i64, i64* @var_i64
%newval64 = sub i64 %val64, 52
store i64 %newval64, i64* @var_i64
ret void
}
...
---
name: sub_small
body: |
bb.0.entry:
; CHECK: %x8 = ADRP target-flags(aarch64-page) @var_i32
; CHECK-NEXT: %x9 = ADRP target-flags(aarch64-page) @var_i64
; CHECK-NEXT: %w10 = LDRWui %x8, target-flags(aarch64-pageoff, aarch64-nc) @var_i32
; CHECK-NEXT: %x11 = LDRXui %x9, target-flags(aarch64-pageoff, aarch64-got, aarch64-nc) @var_i64
; CHECK: STRWui killed %w10, killed %x8, target-flags(aarch64-nc) @var_i32
; CHECK: STRXui killed %x11, killed %x9, target-flags(aarch64-pageoff, aarch64-nc) @var_i64
%x8 = ADRP target-flags(aarch64-page) @var_i32
%x9 = ADRP target-flags(aarch64-page) @var_i64
%w10 = LDRWui %x8, target-flags(aarch64-pageoff, aarch64-nc) @var_i32
%x11 = LDRXui %x9, target-flags(aarch64-pageoff, aarch64-got, aarch64-nc) @var_i64
%w10 = SUBWri killed %w10, 4095, 0
%x11 = SUBXri killed %x11, 52, 0
STRWui killed %w10, killed %x8, target-flags(aarch64-nc) @var_i32
STRXui killed %x11, killed %x9, target-flags(aarch64-pageoff, aarch64-nc) @var_i64
RET_ReallyLR
...