1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - -mtriple=aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s | FileCheck %s
4 name: full_extracts_from_build_vector
6 tracksRegLiveness: true
13 machineFunctionInfo: {}
18 ; CHECK-LABEL: name: full_extracts_from_build_vector
19 ; CHECK: liveins: $x0, $x1
21 ; CHECK-NEXT: %arg1:_(s64) = COPY $x0
22 ; CHECK-NEXT: %arg2:_(s64) = COPY $x1
23 ; CHECK-NEXT: $x0 = COPY %arg1(s64)
24 ; CHECK-NEXT: $x1 = COPY %arg2(s64)
25 ; CHECK-NEXT: RET_ReallyLR implicit $x0
26 %arg1:_(s64) = COPY $x0
27 %arg2:_(s64) = COPY $x1
28 %zero:_(s32) = G_CONSTANT i32 0
29 %one:_(s32) = G_CONSTANT i32 1
30 %bv:_(<2 x s64>) = G_BUILD_VECTOR %arg1(s64), %arg2(s64)
31 %extract:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %zero(s32)
32 %extract2:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %one(s32)
33 $x0 = COPY %extract(s64)
34 $x1 = COPY %extract2(s64)
35 RET_ReallyLR implicit $x0
39 name: full_extracts_from_build_vector_other_use
41 tracksRegLiveness: true
48 machineFunctionInfo: {}
53 ; CHECK-LABEL: name: full_extracts_from_build_vector_other_use
54 ; CHECK: liveins: $x0, $x1
56 ; CHECK-NEXT: %arg1:_(s64) = COPY $x0
57 ; CHECK-NEXT: %arg2:_(s64) = COPY $x1
58 ; CHECK-NEXT: %zero:_(s32) = G_CONSTANT i32 0
59 ; CHECK-NEXT: %one:_(s32) = G_CONSTANT i32 1
60 ; CHECK-NEXT: %bv:_(<2 x s64>) = G_BUILD_VECTOR %arg1(s64), %arg2(s64)
61 ; CHECK-NEXT: %extract:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %zero(s32)
62 ; CHECK-NEXT: %extract2:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %one(s32)
63 ; CHECK-NEXT: $x0 = COPY %extract(s64)
64 ; CHECK-NEXT: $x1 = COPY %extract2(s64)
65 ; CHECK-NEXT: $q0 = COPY %bv(<2 x s64>)
66 ; CHECK-NEXT: RET_ReallyLR implicit $x0
67 %arg1:_(s64) = COPY $x0
68 %arg2:_(s64) = COPY $x1
69 %zero:_(s32) = G_CONSTANT i32 0
70 %one:_(s32) = G_CONSTANT i32 1
71 %bv:_(<2 x s64>) = G_BUILD_VECTOR %arg1(s64), %arg2(s64)
72 %extract:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %zero(s32)
73 %extract2:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %one(s32)
74 $x0 = COPY %extract(s64)
75 $x1 = COPY %extract2(s64)
76 $q0 = COPY %bv(<2 x s64>)
77 RET_ReallyLR implicit $x0
81 name: partial_extracts_from_build_vector_multiple_per_elt
83 tracksRegLiveness: true
90 machineFunctionInfo: {}
95 ; CHECK-LABEL: name: partial_extracts_from_build_vector_multiple_per_elt
96 ; CHECK: liveins: $x0, $x1
98 ; CHECK-NEXT: %arg1:_(s64) = COPY $x0
99 ; CHECK-NEXT: %arg2:_(s64) = COPY $x1
100 ; CHECK-NEXT: $x0 = COPY %arg1(s64)
101 ; CHECK-NEXT: $x1 = COPY %arg2(s64)
102 ; CHECK-NEXT: $x2 = COPY %arg2(s64)
103 ; CHECK-NEXT: RET_ReallyLR implicit $x0
104 %arg1:_(s64) = COPY $x0
105 %arg2:_(s64) = COPY $x1
106 %zero:_(s32) = G_CONSTANT i32 0
107 %one:_(s32) = G_CONSTANT i32 1
108 %bv:_(<2 x s64>) = G_BUILD_VECTOR %arg1(s64), %arg2(s64)
109 %extract:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %zero(s32)
110 %extract2:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %one(s32)
111 %extract3:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %one(s32)
112 $x0 = COPY %extract(s64)
113 $x1 = COPY %extract2(s64)
114 $x2 = COPY %extract3(s64)
115 RET_ReallyLR implicit $x0
119 name: full_extracts_from_build_vector_idx_out_of_range
121 tracksRegLiveness: true
128 machineFunctionInfo: {}
133 ; CHECK-LABEL: name: full_extracts_from_build_vector_idx_out_of_range
134 ; CHECK: liveins: $x0, $x1
136 ; CHECK-NEXT: %arg1:_(s64) = COPY $x0
137 ; CHECK-NEXT: %extract2:_(s64) = G_IMPLICIT_DEF
138 ; CHECK-NEXT: $x0 = COPY %arg1(s64)
139 ; CHECK-NEXT: $x1 = COPY %extract2(s64)
140 ; CHECK-NEXT: RET_ReallyLR implicit $x0
141 %arg1:_(s64) = COPY $x0
142 %arg2:_(s64) = COPY $x1
143 %zero:_(s32) = G_CONSTANT i32 0
144 %one:_(s32) = G_CONSTANT i32 1
145 %two:_(s32) = G_CONSTANT i32 2
146 %bv:_(<2 x s64>) = G_BUILD_VECTOR %arg1(s64), %arg2(s64)
147 %extract:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %zero(s32)
148 %extract2:_(s64) = G_EXTRACT_VECTOR_ELT %bv(<2 x s64>), %two(s32)
149 $x0 = COPY %extract(s64)
150 $x1 = COPY %extract2(s64)
151 RET_ReallyLR implicit $x0