1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
5 tracksRegLiveness: true
10 ; CHECK-LABEL: name: fadd
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
14 ; CHECK-NEXT: %cst:_(s32) = G_FCONSTANT float 1.000000e+00
15 ; CHECK-NEXT: %add:_(s32) = G_FADD [[COPY]], %cst
16 ; CHECK-NEXT: $s0 = COPY %add(s32)
17 ; CHECK-NEXT: RET_ReallyLR
19 %cst:_(s32) = G_FCONSTANT float 1.000000e+00
20 %add:_(s32) = G_FADD %cst, %0
27 tracksRegLiveness: true
32 ; CHECK-LABEL: name: fmul
35 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
36 ; CHECK-NEXT: %cst:_(s32) = G_FCONSTANT float 2.000000e+00
37 ; CHECK-NEXT: %mul:_(s32) = G_FMUL [[COPY]], %cst
38 ; CHECK-NEXT: $s0 = COPY %mul(s32)
39 ; CHECK-NEXT: RET_ReallyLR
41 %cst:_(s32) = G_FCONSTANT float 2.000000e+00
42 %mul:_(s32) = G_FMUL %cst, %0
48 tracksRegLiveness: true
53 ; CHECK-LABEL: name: fmul_vector
56 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
57 ; CHECK-NEXT: %cst_scalar:_(s32) = G_FCONSTANT float 2.000000e+00
58 ; CHECK-NEXT: %cst:_(<4 x s32>) = G_BUILD_VECTOR %cst_scalar(s32), %cst_scalar(s32), %cst_scalar(s32), %cst_scalar(s32)
59 ; CHECK-NEXT: %mul:_(<4 x s32>) = G_FMUL [[COPY]], %cst
60 ; CHECK-NEXT: $q0 = COPY %mul(<4 x s32>)
61 ; CHECK-NEXT: RET_ReallyLR
62 %0:_(<4 x s32>) = COPY $q0
63 %cst_scalar:_(s32) = G_FCONSTANT float 2.000000e+00
64 %cst:_(<4 x s32>) = G_BUILD_VECTOR %cst_scalar, %cst_scalar, %cst_scalar, %cst_scalar
65 %mul:_(<4 x s32>) = G_FMUL %cst, %0
70 name: fmul_splat_with_undef
71 tracksRegLiveness: true
76 ; CHECK-LABEL: name: fmul_splat_with_undef
79 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
80 ; CHECK-NEXT: %undef:_(s32) = G_IMPLICIT_DEF
81 ; CHECK-NEXT: %cst_scalar:_(s32) = G_FCONSTANT float 2.000000e+00
82 ; CHECK-NEXT: %cst:_(<4 x s32>) = G_BUILD_VECTOR %undef(s32), %undef(s32), %cst_scalar(s32), %cst_scalar(s32)
83 ; CHECK-NEXT: %mul:_(<4 x s32>) = G_FMUL [[COPY]], %cst
84 ; CHECK-NEXT: $q0 = COPY %mul(<4 x s32>)
85 ; CHECK-NEXT: RET_ReallyLR
86 %0:_(<4 x s32>) = COPY $q0
87 %undef:_(s32) = G_IMPLICIT_DEF
88 %cst_scalar:_(s32) = G_FCONSTANT float 2.000000e+00
89 %cst:_(<4 x s32>) = G_BUILD_VECTOR %undef, %undef, %cst_scalar, %cst_scalar
90 %mul:_(<4 x s32>) = G_FMUL %cst, %0
95 name: fmul_vector_nonsplat
96 tracksRegLiveness: true
101 ; CHECK-LABEL: name: fmul_vector_nonsplat
102 ; CHECK: liveins: $s0
104 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
105 ; CHECK-NEXT: %scalar:_(s32) = COPY $s0
106 ; CHECK-NEXT: %cst_scalar:_(s32) = G_FCONSTANT float 2.000000e+00
107 ; CHECK-NEXT: %cst:_(<4 x s32>) = G_BUILD_VECTOR %cst_scalar(s32), %cst_scalar(s32), %cst_scalar(s32), %scalar(s32)
108 ; CHECK-NEXT: %mul:_(<4 x s32>) = G_FMUL %cst, [[COPY]]
109 ; CHECK-NEXT: $q0 = COPY %mul(<4 x s32>)
110 ; CHECK-NEXT: RET_ReallyLR
111 %0:_(<4 x s32>) = COPY $q0
112 %scalar:_(s32) = COPY $s0
113 %cst_scalar:_(s32) = G_FCONSTANT float 2.000000e+00
114 %cst:_(<4 x s32>) = G_BUILD_VECTOR %cst_scalar, %cst_scalar, %cst_scalar, %scalar
115 %mul:_(<4 x s32>) = G_FMUL %cst, %0