1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/test/CodeGen/AArch64/machine-sink-zr.mir
Matthias Braun 12c61bab00 Move .mir tests to appropriate directories
test/CodeGen/MIR should contain tests that intent to test the MIR
printing or parsing. Tests that test something else should be in
test/CodeGen/TargetName even when they are written in .mir.

As a rule of thumb, only tests using "llc -run-pass none" should be in
test/CodeGen/MIR.

llvm-svn: 289254
2016-12-09 19:08:15 +00:00

49 lines
920 B
YAML

# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass machine-sink -o - %s | FileCheck %s
--- |
define void @sinkwzr() { ret void }
...
---
name: sinkwzr
tracksRegLiveness: true
registers:
- { id: 0, class: gpr32 }
- { id: 1, class: gpr32 }
- { id: 2, class: gpr32sp }
- { id: 3, class: gpr32 }
- { id: 4, class: gpr32 }
body: |
; Check that WZR copy is sunk into the loop preheader.
; CHECK-LABEL: name: sinkwzr
; CHECK-LABEL: bb.0:
; CHECK-NOT: COPY %wzr
bb.0:
successors: %bb.3, %bb.1
liveins: %w0
%0 = COPY %w0
%1 = COPY %wzr
CBZW %0, %bb.3
; CHECK-LABEL: bb.1:
; CHECK: COPY %wzr
bb.1:
successors: %bb.2
B %bb.2
bb.2:
successors: %bb.3, %bb.2
%2 = PHI %0, %bb.1, %4, %bb.2
%w0 = COPY %1
%3 = SUBSWri %2, 1, 0, implicit-def dead %nzcv
%4 = COPY %3
CBZW %3, %bb.3
B %bb.2
bb.3:
RET_ReallyLR
...