1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-apple-ios -run-pass=greedy -run-pass=virtregrewriter %s -o - | FileCheck %s
7 ; Make sure we don't clobber q3 when we expand the bundle
8 ; CHECK-LABEL: name: func0
9 ; CHECK: $x0 = IMPLICIT_DEF
10 ; CHECK: $q0_q1_q2_q3 = IMPLICIT_DEF
11 ; CHECK: $q4 = COPY $q3
12 ; CHECK: $q1_q2_q3 = COPY $q0_q1_q2
13 ; CHECK: ST4i64 $q1_q2_q3_q4, 0, $x0
15 $q0_q1_q2_q3 = IMPLICIT_DEF
16 $q1_q2_q3 = COPY $q0_q1_q2 {
19 ST4i64 $q1_q2_q3_q4, 0, $x0
26 ; If it was already ordered, make sure we don't break it
27 ; CHECK-LABEL: name: func1
28 ; CHECK: $x0 = IMPLICIT_DEF
29 ; CHECK: $q0_q1_q2_q3 = IMPLICIT_DEF
30 ; CHECK: $q4 = COPY $q3
31 ; CHECK: $q1_q2_q3 = COPY $q0_q1_q2
32 ; CHECK: ST4i64 $q1_q2_q3_q4, 0, $x0
34 $q0_q1_q2_q3 = IMPLICIT_DEF
36 $q1_q2_q3 = COPY $q0_q1_q2
38 ST4i64 $q1_q2_q3_q4, 0, $x0
45 ; A bit less realistic, but check that we handle multiple nodes
46 ; CHECK-LABEL: name: func2
47 ; CHECK: $x0 = IMPLICIT_DEF
48 ; CHECK: $q0_q1_q2_q3 = IMPLICIT_DEF
49 ; CHECK: $q3 = COPY $q2
50 ; CHECK: $q4 = COPY $q1
51 ; CHECK: $q1_q2 = COPY $q0_q1
52 ; CHECK: ST4i64 $q1_q2_q3_q4, 0, $x0
54 $q0_q1_q2_q3 = IMPLICIT_DEF
55 $q1_q2 = COPY $q0_q1 {
59 ST4i64 $q1_q2_q3_q4, 0, $x0
66 ; If there was nothing wrong, don't change the order for no reason
67 ; CHECK-LABEL: name: func3
68 ; CHECK: $x0 = IMPLICIT_DEF
69 ; CHECK: $q1_q2_q3_q4 = IMPLICIT_DEF
70 ; CHECK: $q0_q1 = COPY $q1_q2
71 ; CHECK: $q2_q3 = COPY $q3_q4
72 ; CHECK: ST4i64 $q0_q1_q2_q3, 0, $x0
74 $q1_q2_q3_q4 = IMPLICIT_DEF
75 $q0_q1 = COPY $q1_q2 {
78 ST4i64 $q0_q1_q2_q3, 0, $x0