• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
3
4---
5name:            mul_by_zero
6alignment:       4
7tracksRegLiveness: true
8frameInfo:
9  maxAlignment:    1
10machineFunctionInfo: {}
11body:             |
12  bb.0:
13    liveins: $x0
14    ; CHECK-LABEL: name: mul_by_zero
15    ; CHECK: liveins: $x0
16    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
17    ; CHECK: $x0 = COPY [[C]](s64)
18    %0:_(s64) = COPY $x0
19    %1:_(s64) = G_CONSTANT i64 0
20    %2:_(s64) = G_MUL %0, %1(s64)
21    $x0 = COPY %2(s64)
22...
23---
24name:            mul_vector_by_zero
25alignment:       4
26tracksRegLiveness: true
27frameInfo:
28  maxAlignment:    1
29machineFunctionInfo: {}
30body:             |
31  bb.0:
32    liveins: $q0
33    ; Currently not implemented.
34    ; CHECK-LABEL: name: mul_vector_by_zero
35    ; CHECK: liveins: $q0
36    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
37    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
38    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
39    ; CHECK: [[MUL:%[0-9]+]]:_(<4 x s32>) = G_MUL [[COPY]], [[BUILD_VECTOR]]
40    ; CHECK: $q0 = COPY [[MUL]](<4 x s32>)
41    %0:_(<4 x s32>) = COPY $q0
42    %1:_(s32) = G_CONSTANT i32 0
43    %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
44    %3:_(<4 x s32>) = G_MUL %0, %2(<4 x s32>)
45    $q0 = COPY %3(<4 x s32>)
46...
47---
48name:            mul_by_one
49alignment:       4
50tracksRegLiveness: true
51frameInfo:
52  maxAlignment:    1
53machineFunctionInfo: {}
54body:             |
55  bb.0:
56    liveins: $x0
57    ; CHECK-LABEL: name: mul_by_one
58    ; CHECK: liveins: $x0
59    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
60    ; CHECK: $x0 = COPY [[COPY]](s64)
61    %0:_(s64) = COPY $x0
62    %1:_(s64) = G_CONSTANT i64 1
63    %2:_(s64) = G_MUL %0, %1(s64)
64    $x0 = COPY %2(s64)
65...
66---
67name:            mul_vector_by_one
68alignment:       4
69tracksRegLiveness: true
70frameInfo:
71  maxAlignment:    1
72machineFunctionInfo: {}
73body:             |
74  bb.0:
75    liveins: $q0
76    ; Currently not implemented.
77    ; CHECK-LABEL: name: mul_vector_by_one
78    ; CHECK: liveins: $q0
79    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
80    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
81    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
82    ; CHECK: [[MUL:%[0-9]+]]:_(<4 x s32>) = G_MUL [[COPY]], [[BUILD_VECTOR]]
83    ; CHECK: $q0 = COPY [[MUL]](<4 x s32>)
84    %0:_(<4 x s32>) = COPY $q0
85    %1:_(s32) = G_CONSTANT i32 1
86    %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
87    %3:_(<4 x s32>) = G_MUL %0, %2(<4 x s32>)
88    $q0 = COPY %3(<4 x s32>)
89...
90---
91name:            mul_by_neg_one
92alignment:       4
93tracksRegLiveness: true
94frameInfo:
95  maxAlignment:    1
96machineFunctionInfo: {}
97body:             |
98  bb.0:
99    liveins: $x0
100    ; CHECK-LABEL: name: mul_by_neg_one
101    ; CHECK: liveins: $x0
102    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
103    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
104    ; CHECK: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[C]], [[COPY]]
105    ; CHECK: $x0 = COPY [[SUB]](s64)
106    %0:_(s64) = COPY $x0
107    %1:_(s64) = G_CONSTANT i64 -1
108    %2:_(s64) = G_MUL %0, %1(s64)
109    $x0 = COPY %2(s64)
110...
111---
112name:            mul_vector_by_neg_one
113alignment:       4
114tracksRegLiveness: true
115frameInfo:
116  maxAlignment:    1
117machineFunctionInfo: {}
118body:             |
119  bb.0:
120    liveins: $q0
121    ; Currently not implemented.
122    ; CHECK-LABEL: name: mul_vector_by_neg_one
123    ; CHECK: liveins: $q0
124    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
125    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
126    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
127    ; CHECK: [[MUL:%[0-9]+]]:_(<4 x s32>) = G_MUL [[COPY]], [[BUILD_VECTOR]]
128    ; CHECK: $q0 = COPY [[MUL]](<4 x s32>)
129    %0:_(<4 x s32>) = COPY $q0
130    %1:_(s32) = G_CONSTANT i32 -1
131    %2:_(<4 x s32>) = G_BUILD_VECTOR %1(s32), %1(s32), %1(s32), %1(s32)
132    %3:_(<4 x s32>) = G_MUL %0, %2(<4 x s32>)
133    $q0 = COPY %3(<4 x s32>)
134...
135