| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s |
| 3 |
|
| 4 |
define arm_aapcs_vfpcc void @test_fadd(ptr noalias nocapture readonly %A, float %B, ptr noalias nocapture %C, i32 %n) { |
| 5 |
; CHECK-LABEL: test_fadd: |
| 6 |
; CHECK: @ %bb.0: @ %entry |
| 7 |
; CHECK-NEXT: cmp r2, #1 |
| 8 |
; CHECK-NEXT: it lt |
| 9 |
; CHECK-NEXT: bxlt lr |
| 10 |
; CHECK-NEXT: .LBB0_1: @ %vector.ph |
| 11 |
; CHECK-NEXT: vmov r3, s0 |
| 12 |
; CHECK-NEXT: .LBB0_2: @ %vector.body |
| 13 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 14 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 15 |
; CHECK-NEXT: subs r2, #4 |
| 16 |
; CHECK-NEXT: vadd.f32 q0, q0, r3 |
| 17 |
; CHECK-NEXT: vstrb.8 q0, [r1], #16 |
| 18 |
; CHECK-NEXT: bne .LBB0_2 |
| 19 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 20 |
; CHECK-NEXT: bx lr |
| 21 |
entry: |
| 22 |
%i = and i32 %n, 7 |
| 23 |
%cmp = icmp eq i32 %i, 0 |
| 24 |
tail call void @llvm.assume(i1 %cmp) |
| 25 |
%cmp18 = icmp sgt i32 %n, 0 |
| 26 |
br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 27 |
|
| 28 |
vector.ph: ; preds = %entry |
| 29 |
%broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0 |
| 30 |
%broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 31 |
br label %vector.body |
| 32 |
|
| 33 |
vector.body: ; preds = %vector.body, %vector.ph |
| 34 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 35 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 36 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 37 |
%i3 = fadd fast <4 x float> %wide.load, %broadcast.splat11 |
| 38 |
%i4 = getelementptr inbounds float, ptr %C, i32 %index |
| 39 |
store <4 x float> %i3, ptr %i4, align 4 |
| 40 |
%index.next = add i32 %index, 4 |
| 41 |
%i6 = icmp eq i32 %index.next, %n |
| 42 |
br i1 %i6, label %for.cond.cleanup, label %vector.body |
| 43 |
|
| 44 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 45 |
ret void |
| 46 |
} |
| 47 |
|
| 48 |
define arm_aapcs_vfpcc void @test_fadd_r(ptr noalias nocapture readonly %A, float %B, ptr noalias nocapture %C, i32 %n) { |
| 49 |
; CHECK-LABEL: test_fadd_r: |
| 50 |
; CHECK: @ %bb.0: @ %entry |
| 51 |
; CHECK-NEXT: cmp r2, #1 |
| 52 |
; CHECK-NEXT: it lt |
| 53 |
; CHECK-NEXT: bxlt lr |
| 54 |
; CHECK-NEXT: .LBB1_1: @ %vector.ph |
| 55 |
; CHECK-NEXT: vmov r3, s0 |
| 56 |
; CHECK-NEXT: .LBB1_2: @ %vector.body |
| 57 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 58 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 59 |
; CHECK-NEXT: subs r2, #4 |
| 60 |
; CHECK-NEXT: vadd.f32 q0, q0, r3 |
| 61 |
; CHECK-NEXT: vstrb.8 q0, [r1], #16 |
| 62 |
; CHECK-NEXT: bne .LBB1_2 |
| 63 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 64 |
; CHECK-NEXT: bx lr |
| 65 |
entry: |
| 66 |
%i = and i32 %n, 7 |
| 67 |
%cmp = icmp eq i32 %i, 0 |
| 68 |
tail call void @llvm.assume(i1 %cmp) |
| 69 |
%cmp18 = icmp sgt i32 %n, 0 |
| 70 |
br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 71 |
|
| 72 |
vector.ph: ; preds = %entry |
| 73 |
%broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0 |
| 74 |
%broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 75 |
br label %vector.body |
| 76 |
|
| 77 |
vector.body: ; preds = %vector.body, %vector.ph |
| 78 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 79 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 80 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 81 |
%i3 = fadd fast <4 x float> %broadcast.splat11, %wide.load |
| 82 |
%i4 = getelementptr inbounds float, ptr %C, i32 %index |
| 83 |
store <4 x float> %i3, ptr %i4, align 4 |
| 84 |
%index.next = add i32 %index, 4 |
| 85 |
%i6 = icmp eq i32 %index.next, %n |
| 86 |
br i1 %i6, label %for.cond.cleanup, label %vector.body |
| 87 |
|
| 88 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 89 |
ret void |
| 90 |
} |
| 91 |
|
| 92 |
define arm_aapcs_vfpcc void @test_fmul(ptr noalias nocapture readonly %A, float %B, ptr noalias nocapture %C, i32 %n) { |
| 93 |
; CHECK-LABEL: test_fmul: |
| 94 |
; CHECK: @ %bb.0: @ %entry |
| 95 |
; CHECK-NEXT: cmp r2, #1 |
| 96 |
; CHECK-NEXT: it lt |
| 97 |
; CHECK-NEXT: bxlt lr |
| 98 |
; CHECK-NEXT: .LBB2_1: @ %vector.ph |
| 99 |
; CHECK-NEXT: vmov r3, s0 |
| 100 |
; CHECK-NEXT: .LBB2_2: @ %vector.body |
| 101 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 102 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 103 |
; CHECK-NEXT: subs r2, #4 |
| 104 |
; CHECK-NEXT: vmul.f32 q0, q0, r3 |
| 105 |
; CHECK-NEXT: vstrb.8 q0, [r1], #16 |
| 106 |
; CHECK-NEXT: bne .LBB2_2 |
| 107 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 108 |
; CHECK-NEXT: bx lr |
| 109 |
entry: |
| 110 |
%i = and i32 %n, 7 |
| 111 |
%cmp = icmp eq i32 %i, 0 |
| 112 |
tail call void @llvm.assume(i1 %cmp) |
| 113 |
%cmp18 = icmp sgt i32 %n, 0 |
| 114 |
br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 115 |
|
| 116 |
vector.ph: ; preds = %entry |
| 117 |
%broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0 |
| 118 |
%broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 119 |
br label %vector.body |
| 120 |
|
| 121 |
vector.body: ; preds = %vector.body, %vector.ph |
| 122 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 123 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 124 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 125 |
%i3 = fmul fast <4 x float> %wide.load, %broadcast.splat11 |
| 126 |
%i4 = getelementptr inbounds float, ptr %C, i32 %index |
| 127 |
store <4 x float> %i3, ptr %i4, align 4 |
| 128 |
%index.next = add i32 %index, 4 |
| 129 |
%i6 = icmp eq i32 %index.next, %n |
| 130 |
br i1 %i6, label %for.cond.cleanup, label %vector.body |
| 131 |
|
| 132 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 133 |
ret void |
| 134 |
} |
| 135 |
|
| 136 |
define arm_aapcs_vfpcc void @test_fmul_r(ptr noalias nocapture readonly %A, float %B, ptr noalias nocapture %C, i32 %n) { |
| 137 |
; CHECK-LABEL: test_fmul_r: |
| 138 |
; CHECK: @ %bb.0: @ %entry |
| 139 |
; CHECK-NEXT: cmp r2, #1 |
| 140 |
; CHECK-NEXT: it lt |
| 141 |
; CHECK-NEXT: bxlt lr |
| 142 |
; CHECK-NEXT: .LBB3_1: @ %vector.ph |
| 143 |
; CHECK-NEXT: vmov r3, s0 |
| 144 |
; CHECK-NEXT: .LBB3_2: @ %vector.body |
| 145 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 146 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 147 |
; CHECK-NEXT: subs r2, #4 |
| 148 |
; CHECK-NEXT: vmul.f32 q0, q0, r3 |
| 149 |
; CHECK-NEXT: vstrb.8 q0, [r1], #16 |
| 150 |
; CHECK-NEXT: bne .LBB3_2 |
| 151 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 152 |
; CHECK-NEXT: bx lr |
| 153 |
entry: |
| 154 |
%i = and i32 %n, 7 |
| 155 |
%cmp = icmp eq i32 %i, 0 |
| 156 |
tail call void @llvm.assume(i1 %cmp) |
| 157 |
%cmp18 = icmp sgt i32 %n, 0 |
| 158 |
br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 159 |
|
| 160 |
vector.ph: ; preds = %entry |
| 161 |
%broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0 |
| 162 |
%broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 163 |
br label %vector.body |
| 164 |
|
| 165 |
vector.body: ; preds = %vector.body, %vector.ph |
| 166 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 167 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 168 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 169 |
%i3 = fmul fast <4 x float> %broadcast.splat11, %wide.load |
| 170 |
%i4 = getelementptr inbounds float, ptr %C, i32 %index |
| 171 |
store <4 x float> %i3, ptr %i4, align 4 |
| 172 |
%index.next = add i32 %index, 4 |
| 173 |
%i6 = icmp eq i32 %index.next, %n |
| 174 |
br i1 %i6, label %for.cond.cleanup, label %vector.body |
| 175 |
|
| 176 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 177 |
ret void |
| 178 |
} |
| 179 |
|
| 180 |
define arm_aapcs_vfpcc void @test_fsub(ptr noalias nocapture readonly %A, float %B, ptr noalias nocapture %C, i32 %n) { |
| 181 |
; CHECK-LABEL: test_fsub: |
| 182 |
; CHECK: @ %bb.0: @ %entry |
| 183 |
; CHECK-NEXT: cmp r2, #1 |
| 184 |
; CHECK-NEXT: it lt |
| 185 |
; CHECK-NEXT: bxlt lr |
| 186 |
; CHECK-NEXT: .LBB4_1: @ %vector.ph |
| 187 |
; CHECK-NEXT: vmov r3, s0 |
| 188 |
; CHECK-NEXT: .LBB4_2: @ %vector.body |
| 189 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 190 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 191 |
; CHECK-NEXT: subs r2, #4 |
| 192 |
; CHECK-NEXT: vsub.f32 q0, q0, r3 |
| 193 |
; CHECK-NEXT: vstrb.8 q0, [r1], #16 |
| 194 |
; CHECK-NEXT: bne .LBB4_2 |
| 195 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 196 |
; CHECK-NEXT: bx lr |
| 197 |
entry: |
| 198 |
%i = and i32 %n, 7 |
| 199 |
%cmp = icmp eq i32 %i, 0 |
| 200 |
tail call void @llvm.assume(i1 %cmp) |
| 201 |
%cmp18 = icmp sgt i32 %n, 0 |
| 202 |
br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 203 |
|
| 204 |
vector.ph: ; preds = %entry |
| 205 |
%broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0 |
| 206 |
%broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 207 |
br label %vector.body |
| 208 |
|
| 209 |
vector.body: ; preds = %vector.body, %vector.ph |
| 210 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 211 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 212 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 213 |
%i3 = fsub fast <4 x float> %wide.load, %broadcast.splat11 |
| 214 |
%i4 = getelementptr inbounds float, ptr %C, i32 %index |
| 215 |
store <4 x float> %i3, ptr %i4, align 4 |
| 216 |
%index.next = add i32 %index, 4 |
| 217 |
%i6 = icmp eq i32 %index.next, %n |
| 218 |
br i1 %i6, label %for.cond.cleanup, label %vector.body |
| 219 |
|
| 220 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 221 |
ret void |
| 222 |
} |
| 223 |
|
| 224 |
define arm_aapcs_vfpcc void @test_fsub_r(ptr noalias nocapture readonly %A, float %B, ptr noalias nocapture %C, i32 %n) { |
| 225 |
; CHECK-LABEL: test_fsub_r: |
| 226 |
; CHECK: @ %bb.0: @ %entry |
| 227 |
; CHECK-NEXT: cmp r2, #1 |
| 228 |
; CHECK-NEXT: it lt |
| 229 |
; CHECK-NEXT: bxlt lr |
| 230 |
; CHECK-NEXT: .LBB5_1: @ %vector.ph |
| 231 |
; CHECK-NEXT: vmov r3, s0 |
| 232 |
; CHECK-NEXT: vdup.32 q0, r3 |
| 233 |
; CHECK-NEXT: .LBB5_2: @ %vector.body |
| 234 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 235 |
; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 236 |
; CHECK-NEXT: subs r2, #4 |
| 237 |
; CHECK-NEXT: vsub.f32 q1, q0, q1 |
| 238 |
; CHECK-NEXT: vstrb.8 q1, [r1], #16 |
| 239 |
; CHECK-NEXT: bne .LBB5_2 |
| 240 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 241 |
; CHECK-NEXT: bx lr |
| 242 |
entry: |
| 243 |
%i = and i32 %n, 7 |
| 244 |
%cmp = icmp eq i32 %i, 0 |
| 245 |
tail call void @llvm.assume(i1 %cmp) |
| 246 |
%cmp18 = icmp sgt i32 %n, 0 |
| 247 |
br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 248 |
|
| 249 |
vector.ph: ; preds = %entry |
| 250 |
%broadcast.splatinsert10 = insertelement <4 x float> undef, float %B, i32 0 |
| 251 |
%broadcast.splat11 = shufflevector <4 x float> %broadcast.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 252 |
br label %vector.body |
| 253 |
|
| 254 |
vector.body: ; preds = %vector.body, %vector.ph |
| 255 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 256 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 257 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 258 |
%i3 = fsub fast <4 x float> %broadcast.splat11, %wide.load |
| 259 |
%i4 = getelementptr inbounds float, ptr %C, i32 %index |
| 260 |
store <4 x float> %i3, ptr %i4, align 4 |
| 261 |
%index.next = add i32 %index, 4 |
| 262 |
%i6 = icmp eq i32 %index.next, %n |
| 263 |
br i1 %i6, label %for.cond.cleanup, label %vector.body |
| 264 |
|
| 265 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 266 |
ret void |
| 267 |
} |
| 268 |
|
| 269 |
|
| 270 |
define arm_aapcs_vfpcc void @test_fmas(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 271 |
; CHECK-LABEL: test_fmas: |
| 272 |
; CHECK: @ %bb.0: @ %entry |
| 273 |
; CHECK-NEXT: cmp r3, #1 |
| 274 |
; CHECK-NEXT: it lt |
| 275 |
; CHECK-NEXT: bxlt lr |
| 276 |
; CHECK-NEXT: .LBB6_1: @ %vector.ph |
| 277 |
; CHECK-NEXT: vmov r12, s0 |
| 278 |
; CHECK-NEXT: .LBB6_2: @ %vector.body |
| 279 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 280 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 281 |
; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
| 282 |
; CHECK-NEXT: subs r3, #4 |
| 283 |
; CHECK-NEXT: vfmas.f32 q1, q0, r12 |
| 284 |
; CHECK-NEXT: vstrb.8 q1, [r2], #16 |
| 285 |
; CHECK-NEXT: bne .LBB6_2 |
| 286 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 287 |
; CHECK-NEXT: bx lr |
| 288 |
entry: |
| 289 |
%i = and i32 %n, 7 |
| 290 |
%cmp = icmp eq i32 %i, 0 |
| 291 |
tail call void @llvm.assume(i1 %cmp) |
| 292 |
%cmp110 = icmp sgt i32 %n, 0 |
| 293 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 294 |
|
| 295 |
vector.ph: ; preds = %entry |
| 296 |
%broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0 |
| 297 |
%broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer |
| 298 |
br label %vector.body |
| 299 |
|
| 300 |
vector.body: ; preds = %vector.body, %vector.ph |
| 301 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 302 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 303 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 304 |
%i3 = getelementptr inbounds float, ptr %B, i32 %index |
| 305 |
%wide.load12 = load <4 x float>, ptr %i3, align 4 |
| 306 |
%i5 = fmul fast <4 x float> %wide.load12, %wide.load |
| 307 |
%i6 = fadd fast <4 x float> %i5, %broadcast.splat14 |
| 308 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 309 |
store <4 x float> %i6, ptr %i7, align 4 |
| 310 |
%index.next = add i32 %index, 4 |
| 311 |
%i9 = icmp eq i32 %index.next, %n |
| 312 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 313 |
|
| 314 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 315 |
ret void |
| 316 |
} |
| 317 |
|
| 318 |
define arm_aapcs_vfpcc void @test_fmas_r(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 319 |
; CHECK-LABEL: test_fmas_r: |
| 320 |
; CHECK: @ %bb.0: @ %entry |
| 321 |
; CHECK-NEXT: cmp r3, #1 |
| 322 |
; CHECK-NEXT: it lt |
| 323 |
; CHECK-NEXT: bxlt lr |
| 324 |
; CHECK-NEXT: .LBB7_1: @ %vector.ph |
| 325 |
; CHECK-NEXT: vmov r12, s0 |
| 326 |
; CHECK-NEXT: .LBB7_2: @ %vector.body |
| 327 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 328 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 329 |
; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
| 330 |
; CHECK-NEXT: subs r3, #4 |
| 331 |
; CHECK-NEXT: vfmas.f32 q1, q0, r12 |
| 332 |
; CHECK-NEXT: vstrb.8 q1, [r2], #16 |
| 333 |
; CHECK-NEXT: bne .LBB7_2 |
| 334 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 335 |
; CHECK-NEXT: bx lr |
| 336 |
entry: |
| 337 |
%i = and i32 %n, 7 |
| 338 |
%cmp = icmp eq i32 %i, 0 |
| 339 |
tail call void @llvm.assume(i1 %cmp) |
| 340 |
%cmp110 = icmp sgt i32 %n, 0 |
| 341 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 342 |
|
| 343 |
vector.ph: ; preds = %entry |
| 344 |
%broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0 |
| 345 |
%broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer |
| 346 |
br label %vector.body |
| 347 |
|
| 348 |
vector.body: ; preds = %vector.body, %vector.ph |
| 349 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 350 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 351 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 352 |
%i3 = getelementptr inbounds float, ptr %B, i32 %index |
| 353 |
%wide.load12 = load <4 x float>, ptr %i3, align 4 |
| 354 |
%i5 = fmul fast <4 x float> %wide.load12, %wide.load |
| 355 |
%i6 = fadd fast <4 x float> %broadcast.splat14, %i5 |
| 356 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 357 |
store <4 x float> %i6, ptr %i7, align 4 |
| 358 |
%index.next = add i32 %index, 4 |
| 359 |
%i9 = icmp eq i32 %index.next, %n |
| 360 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 361 |
|
| 362 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 363 |
ret void |
| 364 |
} |
| 365 |
|
| 366 |
define arm_aapcs_vfpcc void @test_fma(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 367 |
; CHECK-LABEL: test_fma: |
| 368 |
; CHECK: @ %bb.0: @ %entry |
| 369 |
; CHECK-NEXT: cmp r3, #1 |
| 370 |
; CHECK-NEXT: it lt |
| 371 |
; CHECK-NEXT: bxlt lr |
| 372 |
; CHECK-NEXT: .LBB8_1: @ %vector.ph |
| 373 |
; CHECK-NEXT: vmov r12, s0 |
| 374 |
; CHECK-NEXT: .LBB8_2: @ %vector.body |
| 375 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 376 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 377 |
; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
| 378 |
; CHECK-NEXT: subs r3, #4 |
| 379 |
; CHECK-NEXT: vfma.f32 q1, q0, r12 |
| 380 |
; CHECK-NEXT: vstrb.8 q1, [r2], #16 |
| 381 |
; CHECK-NEXT: bne .LBB8_2 |
| 382 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 383 |
; CHECK-NEXT: bx lr |
| 384 |
entry: |
| 385 |
%i = and i32 %n, 7 |
| 386 |
%cmp = icmp eq i32 %i, 0 |
| 387 |
tail call void @llvm.assume(i1 %cmp) |
| 388 |
%cmp110 = icmp sgt i32 %n, 0 |
| 389 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 390 |
|
| 391 |
vector.ph: ; preds = %entry |
| 392 |
%broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0 |
| 393 |
%broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer |
| 394 |
br label %vector.body |
| 395 |
|
| 396 |
vector.body: ; preds = %vector.body, %vector.ph |
| 397 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 398 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 399 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 400 |
%i3 = fmul fast <4 x float> %wide.load, %broadcast.splat13 |
| 401 |
%i4 = getelementptr inbounds float, ptr %B, i32 %index |
| 402 |
%wide.load14 = load <4 x float>, ptr %i4, align 4 |
| 403 |
%i6 = fadd fast <4 x float> %i3, %wide.load14 |
| 404 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 405 |
store <4 x float> %i6, ptr %i7, align 4 |
| 406 |
%index.next = add i32 %index, 4 |
| 407 |
%i9 = icmp eq i32 %index.next, %n |
| 408 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 409 |
|
| 410 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 411 |
ret void |
| 412 |
} |
| 413 |
|
| 414 |
define arm_aapcs_vfpcc void @test_fma_r(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 415 |
; CHECK-LABEL: test_fma_r: |
| 416 |
; CHECK: @ %bb.0: @ %entry |
| 417 |
; CHECK-NEXT: cmp r3, #1 |
| 418 |
; CHECK-NEXT: it lt |
| 419 |
; CHECK-NEXT: bxlt lr |
| 420 |
; CHECK-NEXT: .LBB9_1: @ %vector.ph |
| 421 |
; CHECK-NEXT: vmov r12, s0 |
| 422 |
; CHECK-NEXT: .LBB9_2: @ %vector.body |
| 423 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 424 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 425 |
; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
| 426 |
; CHECK-NEXT: subs r3, #4 |
| 427 |
; CHECK-NEXT: vfma.f32 q1, q0, r12 |
| 428 |
; CHECK-NEXT: vstrb.8 q1, [r2], #16 |
| 429 |
; CHECK-NEXT: bne .LBB9_2 |
| 430 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 431 |
; CHECK-NEXT: bx lr |
| 432 |
entry: |
| 433 |
%i = and i32 %n, 7 |
| 434 |
%cmp = icmp eq i32 %i, 0 |
| 435 |
tail call void @llvm.assume(i1 %cmp) |
| 436 |
%cmp110 = icmp sgt i32 %n, 0 |
| 437 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 438 |
|
| 439 |
vector.ph: ; preds = %entry |
| 440 |
%broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0 |
| 441 |
%broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer |
| 442 |
br label %vector.body |
| 443 |
|
| 444 |
vector.body: ; preds = %vector.body, %vector.ph |
| 445 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 446 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 447 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 448 |
%i3 = fmul fast <4 x float> %broadcast.splat13, %wide.load |
| 449 |
%i4 = getelementptr inbounds float, ptr %B, i32 %index |
| 450 |
%wide.load14 = load <4 x float>, ptr %i4, align 4 |
| 451 |
%i6 = fadd fast <4 x float> %i3, %wide.load14 |
| 452 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 453 |
store <4 x float> %i6, ptr %i7, align 4 |
| 454 |
%index.next = add i32 %index, 4 |
| 455 |
%i9 = icmp eq i32 %index.next, %n |
| 456 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 457 |
|
| 458 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 459 |
ret void |
| 460 |
} |
| 461 |
|
| 462 |
|
| 463 |
define arm_aapcs_vfpcc void @test_fmss(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 464 |
; CHECK-LABEL: test_fmss: |
| 465 |
; CHECK: @ %bb.0: @ %entry |
| 466 |
; CHECK-NEXT: cmp r3, #1 |
| 467 |
; CHECK-NEXT: it lt |
| 468 |
; CHECK-NEXT: bxlt lr |
| 469 |
; CHECK-NEXT: .LBB10_1: @ %vector.ph |
| 470 |
; CHECK-NEXT: vmov r12, s0 |
| 471 |
; CHECK-NEXT: vdup.32 q0, r12 |
| 472 |
; CHECK-NEXT: vneg.f32 q0, q0 |
| 473 |
; CHECK-NEXT: .LBB10_2: @ %vector.body |
| 474 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 475 |
; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 476 |
; CHECK-NEXT: vldrw.u32 q2, [r1], #16 |
| 477 |
; CHECK-NEXT: vmov q3, q0 |
| 478 |
; CHECK-NEXT: subs r3, #4 |
| 479 |
; CHECK-NEXT: vfma.f32 q3, q2, q1 |
| 480 |
; CHECK-NEXT: vstrb.8 q3, [r2], #16 |
| 481 |
; CHECK-NEXT: bne .LBB10_2 |
| 482 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 483 |
; CHECK-NEXT: bx lr |
| 484 |
entry: |
| 485 |
%i = and i32 %n, 7 |
| 486 |
%cmp = icmp eq i32 %i, 0 |
| 487 |
tail call void @llvm.assume(i1 %cmp) |
| 488 |
%cmp110 = icmp sgt i32 %n, 0 |
| 489 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 490 |
|
| 491 |
vector.ph: ; preds = %entry |
| 492 |
%broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0 |
| 493 |
%broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer |
| 494 |
br label %vector.body |
| 495 |
|
| 496 |
vector.body: ; preds = %vector.body, %vector.ph |
| 497 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 498 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 499 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 500 |
%i3 = getelementptr inbounds float, ptr %B, i32 %index |
| 501 |
%wide.load12 = load <4 x float>, ptr %i3, align 4 |
| 502 |
%i5 = fmul fast <4 x float> %wide.load12, %wide.load |
| 503 |
%i6 = fsub fast <4 x float> %i5, %broadcast.splat14 |
| 504 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 505 |
store <4 x float> %i6, ptr %i7, align 4 |
| 506 |
%index.next = add i32 %index, 4 |
| 507 |
%i9 = icmp eq i32 %index.next, %n |
| 508 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 509 |
|
| 510 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 511 |
ret void |
| 512 |
} |
| 513 |
|
| 514 |
define arm_aapcs_vfpcc void @test_fmss_r(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 515 |
; CHECK-LABEL: test_fmss_r: |
| 516 |
; CHECK: @ %bb.0: @ %entry |
| 517 |
; CHECK-NEXT: cmp r3, #1 |
| 518 |
; CHECK-NEXT: it lt |
| 519 |
; CHECK-NEXT: bxlt lr |
| 520 |
; CHECK-NEXT: .LBB11_1: @ %vector.ph |
| 521 |
; CHECK-NEXT: vmov r12, s0 |
| 522 |
; CHECK-NEXT: vdup.32 q0, r12 |
| 523 |
; CHECK-NEXT: .LBB11_2: @ %vector.body |
| 524 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 525 |
; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 526 |
; CHECK-NEXT: vldrw.u32 q2, [r1], #16 |
| 527 |
; CHECK-NEXT: vmov q3, q0 |
| 528 |
; CHECK-NEXT: subs r3, #4 |
| 529 |
; CHECK-NEXT: vfms.f32 q3, q2, q1 |
| 530 |
; CHECK-NEXT: vstrb.8 q3, [r2], #16 |
| 531 |
; CHECK-NEXT: bne .LBB11_2 |
| 532 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 533 |
; CHECK-NEXT: bx lr |
| 534 |
entry: |
| 535 |
%i = and i32 %n, 7 |
| 536 |
%cmp = icmp eq i32 %i, 0 |
| 537 |
tail call void @llvm.assume(i1 %cmp) |
| 538 |
%cmp110 = icmp sgt i32 %n, 0 |
| 539 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 540 |
|
| 541 |
vector.ph: ; preds = %entry |
| 542 |
%broadcast.splatinsert13 = insertelement <4 x float> undef, float %C, i32 0 |
| 543 |
%broadcast.splat14 = shufflevector <4 x float> %broadcast.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer |
| 544 |
br label %vector.body |
| 545 |
|
| 546 |
vector.body: ; preds = %vector.body, %vector.ph |
| 547 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 548 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 549 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 550 |
%i3 = getelementptr inbounds float, ptr %B, i32 %index |
| 551 |
%wide.load12 = load <4 x float>, ptr %i3, align 4 |
| 552 |
%i5 = fmul fast <4 x float> %wide.load12, %wide.load |
| 553 |
%i6 = fsub fast <4 x float> %broadcast.splat14, %i5 |
| 554 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 555 |
store <4 x float> %i6, ptr %i7, align 4 |
| 556 |
%index.next = add i32 %index, 4 |
| 557 |
%i9 = icmp eq i32 %index.next, %n |
| 558 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 559 |
|
| 560 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 561 |
ret void |
| 562 |
} |
| 563 |
|
| 564 |
define arm_aapcs_vfpcc void @test_fms(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 565 |
; CHECK-LABEL: test_fms: |
| 566 |
; CHECK: @ %bb.0: @ %entry |
| 567 |
; CHECK-NEXT: cmp r3, #1 |
| 568 |
; CHECK-NEXT: it lt |
| 569 |
; CHECK-NEXT: bxlt lr |
| 570 |
; CHECK-NEXT: .LBB12_1: @ %vector.ph |
| 571 |
; CHECK-NEXT: vmov r12, s0 |
| 572 |
; CHECK-NEXT: .LBB12_2: @ %vector.body |
| 573 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 574 |
; CHECK-NEXT: vldrw.u32 q0, [r1], #16 |
| 575 |
; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 576 |
; CHECK-NEXT: subs r3, #4 |
| 577 |
; CHECK-NEXT: vneg.f32 q0, q0 |
| 578 |
; CHECK-NEXT: vfma.f32 q0, q1, r12 |
| 579 |
; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
| 580 |
; CHECK-NEXT: bne .LBB12_2 |
| 581 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 582 |
; CHECK-NEXT: bx lr |
| 583 |
entry: |
| 584 |
%i = and i32 %n, 7 |
| 585 |
%cmp = icmp eq i32 %i, 0 |
| 586 |
tail call void @llvm.assume(i1 %cmp) |
| 587 |
%cmp110 = icmp sgt i32 %n, 0 |
| 588 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 589 |
|
| 590 |
vector.ph: ; preds = %entry |
| 591 |
%broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0 |
| 592 |
%broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer |
| 593 |
br label %vector.body |
| 594 |
|
| 595 |
vector.body: ; preds = %vector.body, %vector.ph |
| 596 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 597 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 598 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 599 |
%i3 = fmul fast <4 x float> %wide.load, %broadcast.splat13 |
| 600 |
%i4 = getelementptr inbounds float, ptr %B, i32 %index |
| 601 |
%wide.load14 = load <4 x float>, ptr %i4, align 4 |
| 602 |
%i6 = fsub fast <4 x float> %i3, %wide.load14 |
| 603 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 604 |
store <4 x float> %i6, ptr %i7, align 4 |
| 605 |
%index.next = add i32 %index, 4 |
| 606 |
%i9 = icmp eq i32 %index.next, %n |
| 607 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 608 |
|
| 609 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 610 |
ret void |
| 611 |
} |
| 612 |
|
| 613 |
define arm_aapcs_vfpcc void @test_fms_r(ptr noalias nocapture readonly %A, ptr noalias nocapture readonly %B, float %C, ptr noalias nocapture %D, i32 %n) { |
| 614 |
; CHECK-LABEL: test_fms_r: |
| 615 |
; CHECK: @ %bb.0: @ %entry |
| 616 |
; CHECK-NEXT: cmp r3, #1 |
| 617 |
; CHECK-NEXT: it lt |
| 618 |
; CHECK-NEXT: bxlt lr |
| 619 |
; CHECK-NEXT: .LBB13_1: @ %vector.ph |
| 620 |
; CHECK-NEXT: vmov r12, s0 |
| 621 |
; CHECK-NEXT: .LBB13_2: @ %vector.body |
| 622 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 623 |
; CHECK-NEXT: vldrw.u32 q0, [r1], #16 |
| 624 |
; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 625 |
; CHECK-NEXT: subs r3, #4 |
| 626 |
; CHECK-NEXT: vneg.f32 q0, q0 |
| 627 |
; CHECK-NEXT: vfma.f32 q0, q1, r12 |
| 628 |
; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
| 629 |
; CHECK-NEXT: bne .LBB13_2 |
| 630 |
; CHECK-NEXT: @ %bb.3: @ %for.cond.cleanup |
| 631 |
; CHECK-NEXT: bx lr |
| 632 |
entry: |
| 633 |
%i = and i32 %n, 7 |
| 634 |
%cmp = icmp eq i32 %i, 0 |
| 635 |
tail call void @llvm.assume(i1 %cmp) |
| 636 |
%cmp110 = icmp sgt i32 %n, 0 |
| 637 |
br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 638 |
|
| 639 |
vector.ph: ; preds = %entry |
| 640 |
%broadcast.splatinsert12 = insertelement <4 x float> undef, float %C, i32 0 |
| 641 |
%broadcast.splat13 = shufflevector <4 x float> %broadcast.splatinsert12, <4 x float> undef, <4 x i32> zeroinitializer |
| 642 |
br label %vector.body |
| 643 |
|
| 644 |
vector.body: ; preds = %vector.body, %vector.ph |
| 645 |
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 646 |
%i1 = getelementptr inbounds float, ptr %A, i32 %index |
| 647 |
%wide.load = load <4 x float>, ptr %i1, align 4 |
| 648 |
%i3 = fmul fast <4 x float> %broadcast.splat13, %wide.load |
| 649 |
%i4 = getelementptr inbounds float, ptr %B, i32 %index |
| 650 |
%wide.load14 = load <4 x float>, ptr %i4, align 4 |
| 651 |
%i6 = fsub fast <4 x float> %i3, %wide.load14 |
| 652 |
%i7 = getelementptr inbounds float, ptr %D, i32 %index |
| 653 |
store <4 x float> %i6, ptr %i7, align 4 |
| 654 |
%index.next = add i32 %index, 4 |
| 655 |
%i9 = icmp eq i32 %index.next, %n |
| 656 |
br i1 %i9, label %for.cond.cleanup, label %vector.body |
| 657 |
|
| 658 |
for.cond.cleanup: ; preds = %vector.body, %entry |
| 659 |
ret void |
| 660 |
} |
| 661 |
|
| 662 |
|
| 663 |
define dso_local void @test_nested(ptr noalias nocapture %pInT1, ptr noalias nocapture readonly %pOutT1, ptr noalias nocapture readonly %pPRT_in, ptr noalias nocapture readnone %pPRT_pDst, i32 %numRows, i32 %numCols, i32 %l) local_unnamed_addr { |
| 664 |
; CHECK-LABEL: test_nested: |
| 665 |
; CHECK: @ %bb.0: @ %for.body.us.preheader |
| 666 |
; CHECK-NEXT: .save {r4, r5, r6, lr} |
| 667 |
; CHECK-NEXT: push {r4, r5, r6, lr} |
| 668 |
; CHECK-NEXT: ldrd lr, r12, [sp, #16] |
| 669 |
; CHECK-NEXT: lsl.w r3, r12, #2 |
| 670 |
; CHECK-NEXT: .LBB14_1: @ %for.body.us |
| 671 |
; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 672 |
; CHECK-NEXT: @ Child Loop BB14_2 Depth 2 |
| 673 |
; CHECK-NEXT: ldr r4, [r1] |
| 674 |
; CHECK-NEXT: mov r5, r2 |
| 675 |
; CHECK-NEXT: mov r6, r12 |
| 676 |
; CHECK-NEXT: vdup.32 q0, r4 |
| 677 |
; CHECK-NEXT: mov r4, r0 |
| 678 |
; CHECK-NEXT: .LBB14_2: @ %vector.body |
| 679 |
; CHECK-NEXT: @ Parent Loop BB14_1 Depth=1 |
| 680 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 681 |
; CHECK-NEXT: vldrw.u32 q1, [r5], #16 |
| 682 |
; CHECK-NEXT: vldrw.u32 q2, [r4] |
| 683 |
; CHECK-NEXT: subs r6, #4 |
| 684 |
; CHECK-NEXT: vfms.f32 q2, q1, q0 |
| 685 |
; CHECK-NEXT: vstrb.8 q2, [r4], #16 |
| 686 |
; CHECK-NEXT: bne .LBB14_2 |
| 687 |
; CHECK-NEXT: @ %bb.3: @ %for.cond6.for.end_crit_edge.us |
| 688 |
; CHECK-NEXT: @ in Loop: Header=BB14_1 Depth=1 |
| 689 |
; CHECK-NEXT: add r0, r3 |
| 690 |
; CHECK-NEXT: add r2, r3 |
| 691 |
; CHECK-NEXT: adds r1, #4 |
| 692 |
; CHECK-NEXT: le lr, .LBB14_1 |
| 693 |
; CHECK-NEXT: @ %bb.4: @ %for.end14 |
| 694 |
; CHECK-NEXT: pop {r4, r5, r6, pc} |
| 695 |
for.body.us.preheader: |
| 696 |
%cmp = icmp sgt i32 %numRows, 0 |
| 697 |
tail call void @llvm.assume(i1 %cmp) |
| 698 |
%cmp1 = icmp sgt i32 %numCols, 0 |
| 699 |
tail call void @llvm.assume(i1 %cmp1) |
| 700 |
%rem = and i32 %numCols, 7 |
| 701 |
%cmp2 = icmp eq i32 %rem, 0 |
| 702 |
tail call void @llvm.assume(i1 %cmp2) |
| 703 |
%cmp3 = icmp slt i32 %l, %numCols |
| 704 |
tail call void @llvm.assume(i1 %cmp3) |
| 705 |
br label %for.body.us |
| 706 |
|
| 707 |
for.body.us: ; preds = %for.cond6.for.end_crit_edge.us, %for.body.us.preheader |
| 708 |
%pInT1.addr.038.us = phi ptr [ %scevgep40, %for.cond6.for.end_crit_edge.us ], [ %pInT1, %for.body.us.preheader ] |
| 709 |
%i.037.us = phi i32 [ %inc13.us, %for.cond6.for.end_crit_edge.us ], [ 0, %for.body.us.preheader ] |
| 710 |
%pOutT1.addr.036.us = phi ptr [ %incdec.ptr.us, %for.cond6.for.end_crit_edge.us ], [ %pOutT1, %for.body.us.preheader ] |
| 711 |
%pPRT_in.addr.035.us = phi ptr [ %scevgep, %for.cond6.for.end_crit_edge.us ], [ %pPRT_in, %for.body.us.preheader ] |
| 712 |
%scevgep = getelementptr float, ptr %pPRT_in.addr.035.us, i32 %numCols |
| 713 |
%i = load float, ptr %pOutT1.addr.036.us, align 4 |
| 714 |
%broadcast.splatinsert47 = insertelement <4 x float> undef, float %i, i32 0 |
| 715 |
%broadcast.splat48 = shufflevector <4 x float> %broadcast.splatinsert47, <4 x float> undef, <4 x i32> zeroinitializer |
| 716 |
br label %vector.body |
| 717 |
|
| 718 |
vector.body: ; preds = %vector.body, %for.body.us |
| 719 |
%index = phi i32 [ 0, %for.body.us ], [ %index.next, %vector.body ] |
| 720 |
%next.gep = getelementptr float, ptr %pInT1.addr.038.us, i32 %index |
| 721 |
%next.gep45 = getelementptr float, ptr %pPRT_in.addr.035.us, i32 %index |
| 722 |
%wide.load = load <4 x float>, ptr %next.gep, align 4 |
| 723 |
%wide.load46 = load <4 x float>, ptr %next.gep45, align 4 |
| 724 |
%i3 = fmul fast <4 x float> %wide.load46, %broadcast.splat48 |
| 725 |
%i4 = fsub fast <4 x float> %wide.load, %i3 |
| 726 |
store <4 x float> %i4, ptr %next.gep, align 4 |
| 727 |
%index.next = add i32 %index, 4 |
| 728 |
%i5 = icmp eq i32 %index.next, %numCols |
| 729 |
br i1 %i5, label %for.cond6.for.end_crit_edge.us, label %vector.body |
| 730 |
|
| 731 |
for.cond6.for.end_crit_edge.us: ; preds = %vector.body |
| 732 |
%incdec.ptr.us = getelementptr inbounds float, ptr %pOutT1.addr.036.us, i32 1 |
| 733 |
%scevgep40 = getelementptr float, ptr %pInT1.addr.038.us, i32 %numCols |
| 734 |
%inc13.us = add nuw nsw i32 %i.037.us, 1 |
| 735 |
%exitcond41 = icmp eq i32 %inc13.us, %numRows |
| 736 |
br i1 %exitcond41, label %for.end14, label %for.body.us |
| 737 |
|
| 738 |
for.end14: ; preds = %for.cond6.for.end_crit_edge.us |
| 739 |
ret void |
| 740 |
} |
| 741 |
|
| 742 |
%struct.arm_fir_instance_f32 = type { i16, ptr, ptr } |
| 743 |
define void @arm_fir_f32_1_4_mve(ptr nocapture readonly %S, ptr nocapture readonly %pSrc, ptr %pDst, i32 %blockSize) { |
| 744 |
; CHECK-LABEL: arm_fir_f32_1_4_mve: |
| 745 |
; CHECK: @ %bb.0: @ %entry |
| 746 |
; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 747 |
; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 748 |
; CHECK-NEXT: .pad #8 |
| 749 |
; CHECK-NEXT: sub sp, #8 |
| 750 |
; CHECK-NEXT: ldrh.w r10, [r0] |
| 751 |
; CHECK-NEXT: mov r11, r1 |
| 752 |
; CHECK-NEXT: ldr.w r12, [r0, #4] |
| 753 |
; CHECK-NEXT: sub.w r1, r10, #1 |
| 754 |
; CHECK-NEXT: cmp r1, #3 |
| 755 |
; CHECK-NEXT: bhi .LBB15_6 |
| 756 |
; CHECK-NEXT: @ %bb.1: @ %if.then |
| 757 |
; CHECK-NEXT: ldr r4, [r0, #8] |
| 758 |
; CHECK-NEXT: ldrd r7, r6, [r4] |
| 759 |
; CHECK-NEXT: ldrd r5, r8, [r4, #8] |
| 760 |
; CHECK-NEXT: add.w r4, r12, r1, lsl #2 |
| 761 |
; CHECK-NEXT: lsrs r1, r3, #2 |
| 762 |
; CHECK-NEXT: wls lr, r1, .LBB15_5 |
| 763 |
; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph |
| 764 |
; CHECK-NEXT: bic r1, r3, #3 |
| 765 |
; CHECK-NEXT: str r1, [sp] @ 4-byte Spill |
| 766 |
; CHECK-NEXT: add.w r9, r12, #4 |
| 767 |
; CHECK-NEXT: add.w r1, r2, r1, lsl #2 |
| 768 |
; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill |
| 769 |
; CHECK-NEXT: mov r1, r11 |
| 770 |
; CHECK-NEXT: .LBB15_3: @ %while.body |
| 771 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 772 |
; CHECK-NEXT: vldrw.u32 q0, [r1], #16 |
| 773 |
; CHECK-NEXT: vstrb.8 q0, [r4], #16 |
| 774 |
; CHECK-NEXT: vldrw.u32 q0, [r9, #-4] |
| 775 |
; CHECK-NEXT: vldrw.u32 q1, [r9], #16 |
| 776 |
; CHECK-NEXT: vmul.f32 q0, q0, r7 |
| 777 |
; CHECK-NEXT: vldrw.u32 q2, [r9, #-8] |
| 778 |
; CHECK-NEXT: vfma.f32 q0, q1, r6 |
| 779 |
; CHECK-NEXT: vldrw.u32 q1, [r9, #-12] |
| 780 |
; CHECK-NEXT: vfma.f32 q0, q1, r5 |
| 781 |
; CHECK-NEXT: vfma.f32 q0, q2, r8 |
| 782 |
; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
| 783 |
; CHECK-NEXT: le lr, .LBB15_3 |
| 784 |
; CHECK-NEXT: @ %bb.4: @ %while.end.loopexit |
| 785 |
; CHECK-NEXT: ldr r1, [sp] @ 4-byte Reload |
| 786 |
; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload |
| 787 |
; CHECK-NEXT: add.w r12, r12, r1, lsl #2 |
| 788 |
; CHECK-NEXT: add.w r11, r11, r1, lsl #2 |
| 789 |
; CHECK-NEXT: .LBB15_5: @ %while.end |
| 790 |
; CHECK-NEXT: and r1, r3, #3 |
| 791 |
; CHECK-NEXT: vldrw.u32 q0, [r11] |
| 792 |
; CHECK-NEXT: vctp.32 r1 |
| 793 |
; CHECK-NEXT: vpst |
| 794 |
; CHECK-NEXT: vstrwt.32 q0, [r4] |
| 795 |
; CHECK-NEXT: vldrw.u32 q0, [r12] |
| 796 |
; CHECK-NEXT: vldrw.u32 q1, [r12, #4] |
| 797 |
; CHECK-NEXT: vmul.f32 q0, q0, r7 |
| 798 |
; CHECK-NEXT: vfma.f32 q0, q1, r6 |
| 799 |
; CHECK-NEXT: vldrw.u32 q1, [r12, #8] |
| 800 |
; CHECK-NEXT: vfma.f32 q0, q1, r5 |
| 801 |
; CHECK-NEXT: vldrw.u32 q1, [r12, #12] |
| 802 |
; CHECK-NEXT: vfma.f32 q0, q1, r8 |
| 803 |
; CHECK-NEXT: vpst |
| 804 |
; CHECK-NEXT: vstrwt.32 q0, [r2] |
| 805 |
; CHECK-NEXT: ldr.w r12, [r0, #4] |
| 806 |
; CHECK-NEXT: .LBB15_6: @ %if.end |
| 807 |
; CHECK-NEXT: add.w r0, r12, r3, lsl #2 |
| 808 |
; CHECK-NEXT: lsr.w r1, r10, #2 |
| 809 |
; CHECK-NEXT: wls lr, r1, .LBB15_10 |
| 810 |
; CHECK-NEXT: @ %bb.7: @ %while.body51.preheader |
| 811 |
; CHECK-NEXT: bic r2, r10, #3 |
| 812 |
; CHECK-NEXT: adds r1, r2, r3 |
| 813 |
; CHECK-NEXT: mov r3, r12 |
| 814 |
; CHECK-NEXT: add.w r1, r12, r1, lsl #2 |
| 815 |
; CHECK-NEXT: .LBB15_8: @ %while.body51 |
| 816 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 817 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 818 |
; CHECK-NEXT: vstrb.8 q0, [r3], #16 |
| 819 |
; CHECK-NEXT: le lr, .LBB15_8 |
| 820 |
; CHECK-NEXT: @ %bb.9: @ %while.end55.loopexit |
| 821 |
; CHECK-NEXT: add.w r12, r12, r2, lsl #2 |
| 822 |
; CHECK-NEXT: mov r0, r1 |
| 823 |
; CHECK-NEXT: .LBB15_10: @ %while.end55 |
| 824 |
; CHECK-NEXT: ands r1, r10, #3 |
| 825 |
; CHECK-NEXT: beq .LBB15_12 |
| 826 |
; CHECK-NEXT: @ %bb.11: @ %if.then59 |
| 827 |
; CHECK-NEXT: vldrw.u32 q0, [r0] |
| 828 |
; CHECK-NEXT: vctp.32 r1 |
| 829 |
; CHECK-NEXT: vpst |
| 830 |
; CHECK-NEXT: vstrwt.32 q0, [r12] |
| 831 |
; CHECK-NEXT: .LBB15_12: @ %if.end61 |
| 832 |
; CHECK-NEXT: add sp, #8 |
| 833 |
; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc} |
| 834 |
entry: |
| 835 |
%pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, ptr %S, i32 0, i32 1 |
| 836 |
%i = load ptr, ptr %pState1, align 4 |
| 837 |
%pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, ptr %S, i32 0, i32 2 |
| 838 |
%i1 = load ptr, ptr %pCoeffs2, align 4 |
| 839 |
%numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, ptr %S, i32 0, i32 0 |
| 840 |
%i2 = load i16, ptr %numTaps3, align 4 |
| 841 |
%conv = zext i16 %i2 to i32 |
| 842 |
%sub = add nsw i32 %conv, -1 |
| 843 |
%cmp = icmp ult i32 %sub, 4 |
| 844 |
br i1 %cmp, label %if.then, label %if.end |
| 845 |
|
| 846 |
if.then: ; preds = %entry |
| 847 |
%arrayidx = getelementptr inbounds float, ptr %i, i32 %sub |
| 848 |
%incdec.ptr = getelementptr inbounds float, ptr %i1, i32 1 |
| 849 |
%i3 = load float, ptr %i1, align 4 |
| 850 |
%incdec.ptr6 = getelementptr inbounds float, ptr %i1, i32 2 |
| 851 |
%i4 = load float, ptr %incdec.ptr, align 4 |
| 852 |
%incdec.ptr7 = getelementptr inbounds float, ptr %i1, i32 3 |
| 853 |
%i5 = load float, ptr %incdec.ptr6, align 4 |
| 854 |
%i6 = load float, ptr %incdec.ptr7, align 4 |
| 855 |
%shr = lshr i32 %blockSize, 2 |
| 856 |
%cmp9146 = icmp eq i32 %shr, 0 |
| 857 |
%.pre161 = insertelement <4 x float> undef, float %i3, i32 0 |
| 858 |
%.pre162 = shufflevector <4 x float> %.pre161, <4 x float> undef, <4 x i32> zeroinitializer |
| 859 |
%.pre163 = insertelement <4 x float> undef, float %i4, i32 0 |
| 860 |
%.pre164 = shufflevector <4 x float> %.pre163, <4 x float> undef, <4 x i32> zeroinitializer |
| 861 |
%.pre165 = insertelement <4 x float> undef, float %i5, i32 0 |
| 862 |
%.pre166 = shufflevector <4 x float> %.pre165, <4 x float> undef, <4 x i32> zeroinitializer |
| 863 |
%.pre167 = insertelement <4 x float> undef, float %i6, i32 0 |
| 864 |
%.pre168 = shufflevector <4 x float> %.pre167, <4 x float> undef, <4 x i32> zeroinitializer |
| 865 |
br i1 %cmp9146, label %while.end, label %while.body.lr.ph |
| 866 |
|
| 867 |
while.body.lr.ph: ; preds = %if.then |
| 868 |
%i7 = and i32 %blockSize, -4 |
| 869 |
%scevgep158 = getelementptr float, ptr %pDst, i32 %i7 |
| 870 |
br label %while.body |
| 871 |
|
| 872 |
while.body: ; preds = %while.body, %while.body.lr.ph |
| 873 |
%pStateCur.0151 = phi ptr [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.body ] |
| 874 |
%pSamples.0150 = phi ptr [ %i, %while.body.lr.ph ], [ %add.ptr24, %while.body ] |
| 875 |
%pOutput.0149 = phi ptr [ %pDst, %while.body.lr.ph ], [ %add.ptr23, %while.body ] |
| 876 |
%pTempSrc.0148 = phi ptr [ %pSrc, %while.body.lr.ph ], [ %add.ptr11, %while.body ] |
| 877 |
%blkCnt.0147 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ] |
| 878 |
%i9 = load <4 x float>, ptr %pTempSrc.0148, align 4 |
| 879 |
store <4 x float> %i9, ptr %pStateCur.0151, align 4 |
| 880 |
%add.ptr = getelementptr inbounds float, ptr %pStateCur.0151, i32 4 |
| 881 |
%add.ptr11 = getelementptr inbounds float, ptr %pTempSrc.0148, i32 4 |
| 882 |
%i12 = load <4 x float>, ptr %pSamples.0150, align 4 |
| 883 |
%i13 = fmul fast <4 x float> %i12, %.pre162 |
| 884 |
%arrayidx12 = getelementptr inbounds float, ptr %pSamples.0150, i32 1 |
| 885 |
%i15 = load <4 x float>, ptr %arrayidx12, align 4 |
| 886 |
%mul = fmul fast <4 x float> %i15, %.pre164 |
| 887 |
%add = fadd fast <4 x float> %mul, %i13 |
| 888 |
%arrayidx13 = getelementptr inbounds float, ptr %pSamples.0150, i32 2 |
| 889 |
%i17 = load <4 x float>, ptr %arrayidx13, align 4 |
| 890 |
%mul16 = fmul fast <4 x float> %i17, %.pre166 |
| 891 |
%add17 = fadd fast <4 x float> %add, %mul16 |
| 892 |
%arrayidx18 = getelementptr inbounds float, ptr %pSamples.0150, i32 3 |
| 893 |
%i19 = load <4 x float>, ptr %arrayidx18, align 4 |
| 894 |
%mul21 = fmul fast <4 x float> %i19, %.pre168 |
| 895 |
%add22 = fadd fast <4 x float> %add17, %mul21 |
| 896 |
store <4 x float> %add22, ptr %pOutput.0149, align 4 |
| 897 |
%add.ptr23 = getelementptr inbounds float, ptr %pOutput.0149, i32 4 |
| 898 |
%add.ptr24 = getelementptr inbounds float, ptr %pSamples.0150, i32 4 |
| 899 |
%dec = add nsw i32 %blkCnt.0147, -1 |
| 900 |
%cmp9 = icmp eq i32 %dec, 0 |
| 901 |
br i1 %cmp9, label %while.end.loopexit, label %while.body |
| 902 |
|
| 903 |
while.end.loopexit: ; preds = %while.body |
| 904 |
%scevgep157 = getelementptr float, ptr %pSrc, i32 %i7 |
| 905 |
%scevgep159 = getelementptr float, ptr %i, i32 %i7 |
| 906 |
br label %while.end |
| 907 |
|
| 908 |
while.end: ; preds = %while.end.loopexit, %if.then |
| 909 |
%pTempSrc.0.lcssa = phi ptr [ %scevgep157, %while.end.loopexit ], [ %pSrc, %if.then ] |
| 910 |
%pOutput.0.lcssa = phi ptr [ %scevgep158, %while.end.loopexit ], [ %pDst, %if.then ] |
| 911 |
%pSamples.0.lcssa = phi ptr [ %scevgep159, %while.end.loopexit ], [ %i, %if.then ] |
| 912 |
%pStateCur.0.lcssa = phi ptr [ %add.ptr, %while.end.loopexit ], [ %arrayidx, %if.then ] |
| 913 |
%and = and i32 %blockSize, 3 |
| 914 |
%i21 = tail call <4 x i1> @llvm.arm.mve.vctp32(i32 %and) |
| 915 |
%i23 = load <4 x float>, ptr %pTempSrc.0.lcssa, align 4 |
| 916 |
tail call void @llvm.masked.store.v4f32.p0(<4 x float> %i23, ptr %pStateCur.0.lcssa, i32 4, <4 x i1> %i21) |
| 917 |
%i26 = load <4 x float>, ptr %pSamples.0.lcssa, align 4 |
| 918 |
%i27 = fmul fast <4 x float> %i26, %.pre162 |
| 919 |
%arrayidx29 = getelementptr inbounds float, ptr %pSamples.0.lcssa, i32 1 |
| 920 |
%i29 = load <4 x float>, ptr %arrayidx29, align 4 |
| 921 |
%mul32 = fmul fast <4 x float> %i29, %.pre164 |
| 922 |
%add33 = fadd fast <4 x float> %mul32, %i27 |
| 923 |
%arrayidx34 = getelementptr inbounds float, ptr %pSamples.0.lcssa, i32 2 |
| 924 |
%i31 = load <4 x float>, ptr %arrayidx34, align 4 |
| 925 |
%mul37 = fmul fast <4 x float> %i31, %.pre166 |
| 926 |
%add38 = fadd fast <4 x float> %add33, %mul37 |
| 927 |
%arrayidx39 = getelementptr inbounds float, ptr %pSamples.0.lcssa, i32 3 |
| 928 |
%i33 = load <4 x float>, ptr %arrayidx39, align 4 |
| 929 |
%mul42 = fmul fast <4 x float> %i33, %.pre168 |
| 930 |
%add43 = fadd fast <4 x float> %add38, %mul42 |
| 931 |
tail call void @llvm.masked.store.v4f32.p0(<4 x float> %add43, ptr %pOutput.0.lcssa, i32 4, <4 x i1> %i21) |
| 932 |
%.pre = load ptr, ptr %pState1, align 4 |
| 933 |
br label %if.end |
| 934 |
|
| 935 |
if.end: ; preds = %while.end, %entry |
| 936 |
%i35 = phi ptr [ %.pre, %while.end ], [ %i, %entry ] |
| 937 |
%arrayidx45 = getelementptr inbounds float, ptr %i35, i32 %blockSize |
| 938 |
%shr47 = lshr i32 %conv, 2 |
| 939 |
%cmp49141 = icmp eq i32 %shr47, 0 |
| 940 |
br i1 %cmp49141, label %while.end55, label %while.body51.preheader |
| 941 |
|
| 942 |
while.body51.preheader: ; preds = %if.end |
| 943 |
%i36 = and i32 %conv, 65532 |
| 944 |
%i37 = add i32 %i36, %blockSize |
| 945 |
%scevgep = getelementptr float, ptr %i35, i32 %i37 |
| 946 |
br label %while.body51 |
| 947 |
|
| 948 |
while.body51: ; preds = %while.body51, %while.body51.preheader |
| 949 |
%pTempSrc.1144 = phi ptr [ %add.ptr52, %while.body51 ], [ %arrayidx45, %while.body51.preheader ] |
| 950 |
%pTempDest.0143 = phi ptr [ %add.ptr53, %while.body51 ], [ %i35, %while.body51.preheader ] |
| 951 |
%blkCnt.1142 = phi i32 [ %dec54, %while.body51 ], [ %shr47, %while.body51.preheader ] |
| 952 |
%i39 = load <4 x float>, ptr %pTempSrc.1144, align 4 |
| 953 |
store <4 x float> %i39, ptr %pTempDest.0143, align 4 |
| 954 |
%add.ptr52 = getelementptr inbounds float, ptr %pTempSrc.1144, i32 4 |
| 955 |
%add.ptr53 = getelementptr inbounds float, ptr %pTempDest.0143, i32 4 |
| 956 |
%dec54 = add nsw i32 %blkCnt.1142, -1 |
| 957 |
%cmp49 = icmp eq i32 %dec54, 0 |
| 958 |
br i1 %cmp49, label %while.end55.loopexit, label %while.body51 |
| 959 |
|
| 960 |
while.end55.loopexit: ; preds = %while.body51 |
| 961 |
%scevgep156 = getelementptr float, ptr %i35, i32 %i36 |
| 962 |
br label %while.end55 |
| 963 |
|
| 964 |
while.end55: ; preds = %while.end55.loopexit, %if.end |
| 965 |
%pTempDest.0.lcssa = phi ptr [ %i35, %if.end ], [ %scevgep156, %while.end55.loopexit ] |
| 966 |
%pTempSrc.1.lcssa = phi ptr [ %arrayidx45, %if.end ], [ %scevgep, %while.end55.loopexit ] |
| 967 |
%and56 = and i32 %conv, 3 |
| 968 |
%cmp57 = icmp eq i32 %and56, 0 |
| 969 |
br i1 %cmp57, label %if.end61, label %if.then59 |
| 970 |
|
| 971 |
if.then59: ; preds = %while.end55 |
| 972 |
%i41 = tail call <4 x i1> @llvm.arm.mve.vctp32(i32 %and56) |
| 973 |
%i43 = load <4 x float>, ptr %pTempSrc.1.lcssa, align 4 |
| 974 |
tail call void @llvm.masked.store.v4f32.p0(<4 x float> %i43, ptr %pTempDest.0.lcssa, i32 4, <4 x i1> %i41) |
| 975 |
br label %if.end61 |
| 976 |
|
| 977 |
if.end61: ; preds = %if.then59, %while.end55 |
| 978 |
ret void |
| 979 |
} |
| 980 |
|
| 981 |
|
| 982 |
define void @fir(ptr nocapture readonly %S, ptr nocapture readonly %pSrc, ptr nocapture %pDst, i32 %blockSize) { |
| 983 |
; CHECK-LABEL: fir: |
| 984 |
; CHECK: @ %bb.0: @ %entry |
| 985 |
; CHECK-NEXT: cmp r3, #8 |
| 986 |
; CHECK-NEXT: blo.w .LBB16_13 |
| 987 |
; CHECK-NEXT: @ %bb.1: @ %if.then |
| 988 |
; CHECK-NEXT: lsrs.w r12, r3, #2 |
| 989 |
; CHECK-NEXT: it eq |
| 990 |
; CHECK-NEXT: bxeq lr |
| 991 |
; CHECK-NEXT: .LBB16_2: @ %while.body.lr.ph |
| 992 |
; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 993 |
; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 994 |
; CHECK-NEXT: .pad #4 |
| 995 |
; CHECK-NEXT: sub sp, #4 |
| 996 |
; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13} |
| 997 |
; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13} |
| 998 |
; CHECK-NEXT: .pad #24 |
| 999 |
; CHECK-NEXT: sub sp, #24 |
| 1000 |
; CHECK-NEXT: ldrh r6, [r0] |
| 1001 |
; CHECK-NEXT: movs r4, #1 |
| 1002 |
; CHECK-NEXT: ldrd r7, r10, [r0, #4] |
| 1003 |
; CHECK-NEXT: sub.w r0, r6, #8 |
| 1004 |
; CHECK-NEXT: add.w r3, r0, r0, lsr #29 |
| 1005 |
; CHECK-NEXT: and r0, r0, #7 |
| 1006 |
; CHECK-NEXT: asrs r5, r3, #3 |
| 1007 |
; CHECK-NEXT: cmp r5, #1 |
| 1008 |
; CHECK-NEXT: it gt |
| 1009 |
; CHECK-NEXT: asrgt r4, r3, #3 |
| 1010 |
; CHECK-NEXT: add.w r3, r7, r6, lsl #2 |
| 1011 |
; CHECK-NEXT: sub.w r9, r3, #4 |
| 1012 |
; CHECK-NEXT: rsbs r3, r6, #0 |
| 1013 |
; CHECK-NEXT: str r4, [sp] @ 4-byte Spill |
| 1014 |
; CHECK-NEXT: str r6, [sp, #8] @ 4-byte Spill |
| 1015 |
; CHECK-NEXT: str r3, [sp, #4] @ 4-byte Spill |
| 1016 |
; CHECK-NEXT: str r0, [sp, #12] @ 4-byte Spill |
| 1017 |
; CHECK-NEXT: b .LBB16_6 |
| 1018 |
; CHECK-NEXT: .LBB16_3: @ %while.end.loopexit |
| 1019 |
; CHECK-NEXT: @ in Loop: Header=BB16_6 Depth=1 |
| 1020 |
; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload |
| 1021 |
; CHECK-NEXT: add.w r7, r7, r0, lsl #2 |
| 1022 |
; CHECK-NEXT: b .LBB16_5 |
| 1023 |
; CHECK-NEXT: .LBB16_4: @ %for.end |
| 1024 |
; CHECK-NEXT: @ in Loop: Header=BB16_6 Depth=1 |
| 1025 |
; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload |
| 1026 |
; CHECK-NEXT: ldrd r0, r9, [sp, #12] @ 8-byte Folded Reload |
| 1027 |
; CHECK-NEXT: wls lr, r0, .LBB16_5 |
| 1028 |
; CHECK-NEXT: b .LBB16_10 |
| 1029 |
; CHECK-NEXT: .LBB16_5: @ %while.end |
| 1030 |
; CHECK-NEXT: @ in Loop: Header=BB16_6 Depth=1 |
| 1031 |
; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload |
| 1032 |
; CHECK-NEXT: subs.w r12, r12, #1 |
| 1033 |
; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
| 1034 |
; CHECK-NEXT: add.w r0, r7, r0, lsl #2 |
| 1035 |
; CHECK-NEXT: add.w r7, r0, #16 |
| 1036 |
; CHECK-NEXT: beq .LBB16_12 |
| 1037 |
; CHECK-NEXT: .LBB16_6: @ %while.body |
| 1038 |
; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 1039 |
; CHECK-NEXT: @ Child Loop BB16_8 Depth 2 |
| 1040 |
; CHECK-NEXT: @ Child Loop BB16_11 Depth 2 |
| 1041 |
; CHECK-NEXT: add.w lr, r10, #8 |
| 1042 |
; CHECK-NEXT: vldrw.u32 q0, [r1], #16 |
| 1043 |
; CHECK-NEXT: ldrd r3, r4, [r10] |
| 1044 |
; CHECK-NEXT: ldm.w lr, {r0, r5, r6, lr} |
| 1045 |
; CHECK-NEXT: ldrd r11, r8, [r10, #24] |
| 1046 |
; CHECK-NEXT: vstrb.8 q0, [r9], #16 |
| 1047 |
; CHECK-NEXT: vldrw.u32 q0, [r7], #32 |
| 1048 |
; CHECK-NEXT: str r1, [sp, #20] @ 4-byte Spill |
| 1049 |
; CHECK-NEXT: str.w r9, [sp, #16] @ 4-byte Spill |
| 1050 |
; CHECK-NEXT: vldrw.u32 q1, [r7, #-28] |
| 1051 |
; CHECK-NEXT: vmul.f32 q0, q0, r3 |
| 1052 |
; CHECK-NEXT: vldrw.u32 q6, [r7, #-24] |
| 1053 |
; CHECK-NEXT: vldrw.u32 q4, [r7, #-20] |
| 1054 |
; CHECK-NEXT: vfma.f32 q0, q1, r4 |
| 1055 |
; CHECK-NEXT: vldrw.u32 q5, [r7, #-16] |
| 1056 |
; CHECK-NEXT: vfma.f32 q0, q6, r0 |
| 1057 |
; CHECK-NEXT: vldrw.u32 q2, [r7, #-12] |
| 1058 |
; CHECK-NEXT: vfma.f32 q0, q4, r5 |
| 1059 |
; CHECK-NEXT: vldrw.u32 q3, [r7, #-8] |
| 1060 |
; CHECK-NEXT: vfma.f32 q0, q5, r6 |
| 1061 |
; CHECK-NEXT: vldrw.u32 q1, [r7, #-4] |
| 1062 |
; CHECK-NEXT: vfma.f32 q0, q2, lr |
| 1063 |
; CHECK-NEXT: ldr r0, [sp, #8] @ 4-byte Reload |
| 1064 |
; CHECK-NEXT: vfma.f32 q0, q3, r11 |
| 1065 |
; CHECK-NEXT: vfma.f32 q0, q1, r8 |
| 1066 |
; CHECK-NEXT: cmp r0, #16 |
| 1067 |
; CHECK-NEXT: blo .LBB16_9 |
| 1068 |
; CHECK-NEXT: @ %bb.7: @ %for.body.preheader |
| 1069 |
; CHECK-NEXT: @ in Loop: Header=BB16_6 Depth=1 |
| 1070 |
; CHECK-NEXT: ldr r0, [sp] @ 4-byte Reload |
| 1071 |
; CHECK-NEXT: add.w r4, r10, #32 |
| 1072 |
; CHECK-NEXT: dls lr, r0 |
| 1073 |
; CHECK-NEXT: .LBB16_8: @ %for.body |
| 1074 |
; CHECK-NEXT: @ Parent Loop BB16_6 Depth=1 |
| 1075 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 1076 |
; CHECK-NEXT: ldm.w r4, {r0, r3, r5, r6, r8, r11} |
| 1077 |
; CHECK-NEXT: vldrw.u32 q1, [r7], #32 |
| 1078 |
; CHECK-NEXT: vldrw.u32 q6, [r7, #-24] |
| 1079 |
; CHECK-NEXT: vldrw.u32 q4, [r7, #-20] |
| 1080 |
; CHECK-NEXT: vfma.f32 q0, q1, r0 |
| 1081 |
; CHECK-NEXT: vldrw.u32 q1, [r7, #-28] |
| 1082 |
; CHECK-NEXT: vldrw.u32 q5, [r7, #-16] |
| 1083 |
; CHECK-NEXT: vldrw.u32 q2, [r7, #-12] |
| 1084 |
; CHECK-NEXT: vfma.f32 q0, q1, r3 |
| 1085 |
; CHECK-NEXT: ldrd r9, r1, [r4, #24] |
| 1086 |
; CHECK-NEXT: vfma.f32 q0, q6, r5 |
| 1087 |
; CHECK-NEXT: vldrw.u32 q3, [r7, #-8] |
| 1088 |
; CHECK-NEXT: vfma.f32 q0, q4, r6 |
| 1089 |
; CHECK-NEXT: vldrw.u32 q1, [r7, #-4] |
| 1090 |
; CHECK-NEXT: vfma.f32 q0, q5, r8 |
| 1091 |
; CHECK-NEXT: adds r4, #32 |
| 1092 |
; CHECK-NEXT: vfma.f32 q0, q2, r11 |
| 1093 |
; CHECK-NEXT: vfma.f32 q0, q3, r9 |
| 1094 |
; CHECK-NEXT: vfma.f32 q0, q1, r1 |
| 1095 |
; CHECK-NEXT: le lr, .LBB16_8 |
| 1096 |
; CHECK-NEXT: b .LBB16_4 |
| 1097 |
; CHECK-NEXT: .LBB16_9: @ in Loop: Header=BB16_6 Depth=1 |
| 1098 |
; CHECK-NEXT: add.w r4, r10, #32 |
| 1099 |
; CHECK-NEXT: b .LBB16_4 |
| 1100 |
; CHECK-NEXT: .LBB16_10: @ %while.body76.preheader |
| 1101 |
; CHECK-NEXT: @ in Loop: Header=BB16_6 Depth=1 |
| 1102 |
; CHECK-NEXT: mov r3, r7 |
| 1103 |
; CHECK-NEXT: .LBB16_11: @ %while.body76 |
| 1104 |
; CHECK-NEXT: @ Parent Loop BB16_6 Depth=1 |
| 1105 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 1106 |
; CHECK-NEXT: ldr r0, [r4], #4 |
| 1107 |
; CHECK-NEXT: vldrw.u32 q1, [r3], #4 |
| 1108 |
; CHECK-NEXT: vfma.f32 q0, q1, r0 |
| 1109 |
; CHECK-NEXT: le lr, .LBB16_11 |
| 1110 |
; CHECK-NEXT: b .LBB16_3 |
| 1111 |
; CHECK-NEXT: .LBB16_12: |
| 1112 |
; CHECK-NEXT: add sp, #24 |
| 1113 |
; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13} |
| 1114 |
; CHECK-NEXT: add sp, #4 |
| 1115 |
; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 1116 |
; CHECK-NEXT: .LBB16_13: @ %if.end |
| 1117 |
; CHECK-NEXT: bx lr |
| 1118 |
entry: |
| 1119 |
%pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, ptr %S, i32 0, i32 1 |
| 1120 |
%i = load ptr, ptr %pState1, align 4 |
| 1121 |
%pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, ptr %S, i32 0, i32 2 |
| 1122 |
%i1 = load ptr, ptr %pCoeffs2, align 4 |
| 1123 |
%numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, ptr %S, i32 0, i32 0 |
| 1124 |
%i2 = load i16, ptr %numTaps3, align 4 |
| 1125 |
%conv = zext i16 %i2 to i32 |
| 1126 |
%cmp = icmp ugt i32 %blockSize, 7 |
| 1127 |
br i1 %cmp, label %if.then, label %if.end |
| 1128 |
|
| 1129 |
if.then: ; preds = %entry |
| 1130 |
%shr = lshr i32 %blockSize, 2 |
| 1131 |
%cmp5217 = icmp eq i32 %shr, 0 |
| 1132 |
br i1 %cmp5217, label %if.end, label %while.body.lr.ph |
| 1133 |
|
| 1134 |
while.body.lr.ph: ; preds = %if.then |
| 1135 |
%sub = add nsw i32 %conv, -1 |
| 1136 |
%arrayidx = getelementptr inbounds float, ptr %i, i32 %sub |
| 1137 |
%incdec.ptr = getelementptr inbounds float, ptr %i1, i32 1 |
| 1138 |
%incdec.ptr7 = getelementptr inbounds float, ptr %i1, i32 2 |
| 1139 |
%incdec.ptr8 = getelementptr inbounds float, ptr %i1, i32 3 |
| 1140 |
%incdec.ptr9 = getelementptr inbounds float, ptr %i1, i32 4 |
| 1141 |
%incdec.ptr10 = getelementptr inbounds float, ptr %i1, i32 5 |
| 1142 |
%incdec.ptr11 = getelementptr inbounds float, ptr %i1, i32 6 |
| 1143 |
%incdec.ptr12 = getelementptr inbounds float, ptr %i1, i32 7 |
| 1144 |
%sub37 = add nsw i32 %conv, -8 |
| 1145 |
%div = sdiv i32 %sub37, 8 |
| 1146 |
%pCoeffsCur.0199 = getelementptr inbounds float, ptr %i1, i32 8 |
| 1147 |
%cmp38201 = icmp ugt i16 %i2, 15 |
| 1148 |
%and = and i32 %sub37, 7 |
| 1149 |
%cmp74210 = icmp eq i32 %and, 0 |
| 1150 |
%idx.neg = sub nsw i32 0, %conv |
| 1151 |
%i3 = icmp sgt i32 %div, 1 |
| 1152 |
%smax = select i1 %i3, i32 %div, i32 1 |
| 1153 |
br label %while.body |
| 1154 |
|
| 1155 |
while.body: ; preds = %while.end, %while.body.lr.ph |
| 1156 |
%blkCnt.0222 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec84, %while.end ] |
| 1157 |
%pStateCur.0221 = phi ptr [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.end ] |
| 1158 |
%pSamples.0220 = phi ptr [ %i, %while.body.lr.ph ], [ %add.ptr83, %while.end ] |
| 1159 |
%pTempSrc.0219 = phi ptr [ %pSrc, %while.body.lr.ph ], [ %add.ptr14, %while.end ] |
| 1160 |
%pOutput.0218 = phi ptr [ %pDst, %while.body.lr.ph ], [ %add.ptr81, %while.end ] |
| 1161 |
%i4 = load float, ptr %i1, align 4 |
| 1162 |
%i5 = load float, ptr %incdec.ptr, align 4 |
| 1163 |
%i6 = load float, ptr %incdec.ptr7, align 4 |
| 1164 |
%i7 = load float, ptr %incdec.ptr8, align 4 |
| 1165 |
%i8 = load float, ptr %incdec.ptr9, align 4 |
| 1166 |
%i9 = load float, ptr %incdec.ptr10, align 4 |
| 1167 |
%i10 = load float, ptr %incdec.ptr11, align 4 |
| 1168 |
%i11 = load float, ptr %incdec.ptr12, align 4 |
| 1169 |
%i13 = load <4 x float>, ptr %pTempSrc.0219, align 4 |
| 1170 |
store <4 x float> %i13, ptr %pStateCur.0221, align 4 |
| 1171 |
%add.ptr = getelementptr inbounds float, ptr %pStateCur.0221, i32 4 |
| 1172 |
%add.ptr14 = getelementptr inbounds float, ptr %pTempSrc.0219, i32 4 |
| 1173 |
%i16 = load <4 x float>, ptr %pSamples.0220, align 4 |
| 1174 |
%.splatinsert = insertelement <4 x float> undef, float %i4, i32 0 |
| 1175 |
%.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer |
| 1176 |
%i17 = fmul fast <4 x float> %i16, %.splat |
| 1177 |
%arrayidx15 = getelementptr inbounds float, ptr %pSamples.0220, i32 1 |
| 1178 |
%i19 = load <4 x float>, ptr %arrayidx15, align 4 |
| 1179 |
%.splatinsert16 = insertelement <4 x float> undef, float %i5, i32 0 |
| 1180 |
%.splat17 = shufflevector <4 x float> %.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer |
| 1181 |
%i20 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i19, <4 x float> %.splat17, <4 x float> %i17) |
| 1182 |
%arrayidx18 = getelementptr inbounds float, ptr %pSamples.0220, i32 2 |
| 1183 |
%i22 = load <4 x float>, ptr %arrayidx18, align 4 |
| 1184 |
%.splatinsert19 = insertelement <4 x float> undef, float %i6, i32 0 |
| 1185 |
%.splat20 = shufflevector <4 x float> %.splatinsert19, <4 x float> undef, <4 x i32> zeroinitializer |
| 1186 |
%i23 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i22, <4 x float> %.splat20, <4 x float> %i20) |
| 1187 |
%arrayidx21 = getelementptr inbounds float, ptr %pSamples.0220, i32 3 |
| 1188 |
%i25 = load <4 x float>, ptr %arrayidx21, align 4 |
| 1189 |
%.splatinsert22 = insertelement <4 x float> undef, float %i7, i32 0 |
| 1190 |
%.splat23 = shufflevector <4 x float> %.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer |
| 1191 |
%i26 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i25, <4 x float> %.splat23, <4 x float> %i23) |
| 1192 |
%arrayidx24 = getelementptr inbounds float, ptr %pSamples.0220, i32 4 |
| 1193 |
%i28 = load <4 x float>, ptr %arrayidx24, align 4 |
| 1194 |
%.splatinsert25 = insertelement <4 x float> undef, float %i8, i32 0 |
| 1195 |
%.splat26 = shufflevector <4 x float> %.splatinsert25, <4 x float> undef, <4 x i32> zeroinitializer |
| 1196 |
%i29 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i28, <4 x float> %.splat26, <4 x float> %i26) |
| 1197 |
%arrayidx27 = getelementptr inbounds float, ptr %pSamples.0220, i32 5 |
| 1198 |
%i31 = load <4 x float>, ptr %arrayidx27, align 4 |
| 1199 |
%.splatinsert28 = insertelement <4 x float> undef, float %i9, i32 0 |
| 1200 |
%.splat29 = shufflevector <4 x float> %.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer |
| 1201 |
%i32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i31, <4 x float> %.splat29, <4 x float> %i29) |
| 1202 |
%arrayidx30 = getelementptr inbounds float, ptr %pSamples.0220, i32 6 |
| 1203 |
%i34 = load <4 x float>, ptr %arrayidx30, align 4 |
| 1204 |
%.splatinsert31 = insertelement <4 x float> undef, float %i10, i32 0 |
| 1205 |
%.splat32 = shufflevector <4 x float> %.splatinsert31, <4 x float> undef, <4 x i32> zeroinitializer |
| 1206 |
%i35 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i34, <4 x float> %.splat32, <4 x float> %i32) |
| 1207 |
%arrayidx33 = getelementptr inbounds float, ptr %pSamples.0220, i32 7 |
| 1208 |
%i37 = load <4 x float>, ptr %arrayidx33, align 4 |
| 1209 |
%.splatinsert34 = insertelement <4 x float> undef, float %i11, i32 0 |
| 1210 |
%.splat35 = shufflevector <4 x float> %.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer |
| 1211 |
%i38 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i37, <4 x float> %.splat35, <4 x float> %i35) |
| 1212 |
%pSamples.1200 = getelementptr inbounds float, ptr %pSamples.0220, i32 8 |
| 1213 |
br i1 %cmp38201, label %for.body, label %for.end |
| 1214 |
|
| 1215 |
for.body: ; preds = %for.body, %while.body |
| 1216 |
%pSamples.1207 = phi ptr [ %pSamples.1, %for.body ], [ %pSamples.1200, %while.body ] |
| 1217 |
%pCoeffsCur.0206 = phi ptr [ %pCoeffsCur.0, %for.body ], [ %pCoeffsCur.0199, %while.body ] |
| 1218 |
%.pn205 = phi ptr [ %pCoeffsCur.0206, %for.body ], [ %i1, %while.body ] |
| 1219 |
%i.0204 = phi i32 [ %inc, %for.body ], [ 0, %while.body ] |
| 1220 |
%vecAcc0.0203 = phi <4 x float> [ %i70, %for.body ], [ %i38, %while.body ] |
| 1221 |
%pSamples.0.pn202 = phi ptr [ %pSamples.1207, %for.body ], [ %pSamples.0220, %while.body ] |
| 1222 |
%incdec.ptr40 = getelementptr inbounds float, ptr %.pn205, i32 9 |
| 1223 |
%i39 = load float, ptr %pCoeffsCur.0206, align 4 |
| 1224 |
%incdec.ptr41 = getelementptr inbounds float, ptr %.pn205, i32 10 |
| 1225 |
%i40 = load float, ptr %incdec.ptr40, align 4 |
| 1226 |
%incdec.ptr42 = getelementptr inbounds float, ptr %.pn205, i32 11 |
| 1227 |
%i41 = load float, ptr %incdec.ptr41, align 4 |
| 1228 |
%incdec.ptr43 = getelementptr inbounds float, ptr %.pn205, i32 12 |
| 1229 |
%i42 = load float, ptr %incdec.ptr42, align 4 |
| 1230 |
%incdec.ptr44 = getelementptr inbounds float, ptr %.pn205, i32 13 |
| 1231 |
%i43 = load float, ptr %incdec.ptr43, align 4 |
| 1232 |
%incdec.ptr45 = getelementptr inbounds float, ptr %.pn205, i32 14 |
| 1233 |
%i44 = load float, ptr %incdec.ptr44, align 4 |
| 1234 |
%incdec.ptr46 = getelementptr inbounds float, ptr %.pn205, i32 15 |
| 1235 |
%i45 = load float, ptr %incdec.ptr45, align 4 |
| 1236 |
%i46 = load float, ptr %incdec.ptr46, align 4 |
| 1237 |
%i48 = load <4 x float>, ptr %pSamples.1207, align 4 |
| 1238 |
%.splatinsert48 = insertelement <4 x float> undef, float %i39, i32 0 |
| 1239 |
%.splat49 = shufflevector <4 x float> %.splatinsert48, <4 x float> undef, <4 x i32> zeroinitializer |
| 1240 |
%i49 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i48, <4 x float> %.splat49, <4 x float> %vecAcc0.0203) |
| 1241 |
%arrayidx50 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 9 |
| 1242 |
%i51 = load <4 x float>, ptr %arrayidx50, align 4 |
| 1243 |
%.splatinsert51 = insertelement <4 x float> undef, float %i40, i32 0 |
| 1244 |
%.splat52 = shufflevector <4 x float> %.splatinsert51, <4 x float> undef, <4 x i32> zeroinitializer |
| 1245 |
%i52 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i51, <4 x float> %.splat52, <4 x float> %i49) |
| 1246 |
%arrayidx53 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 10 |
| 1247 |
%i54 = load <4 x float>, ptr %arrayidx53, align 4 |
| 1248 |
%.splatinsert54 = insertelement <4 x float> undef, float %i41, i32 0 |
| 1249 |
%.splat55 = shufflevector <4 x float> %.splatinsert54, <4 x float> undef, <4 x i32> zeroinitializer |
| 1250 |
%i55 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i54, <4 x float> %.splat55, <4 x float> %i52) |
| 1251 |
%arrayidx56 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 11 |
| 1252 |
%i57 = load <4 x float>, ptr %arrayidx56, align 4 |
| 1253 |
%.splatinsert57 = insertelement <4 x float> undef, float %i42, i32 0 |
| 1254 |
%.splat58 = shufflevector <4 x float> %.splatinsert57, <4 x float> undef, <4 x i32> zeroinitializer |
| 1255 |
%i58 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i57, <4 x float> %.splat58, <4 x float> %i55) |
| 1256 |
%arrayidx59 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 12 |
| 1257 |
%i60 = load <4 x float>, ptr %arrayidx59, align 4 |
| 1258 |
%.splatinsert60 = insertelement <4 x float> undef, float %i43, i32 0 |
| 1259 |
%.splat61 = shufflevector <4 x float> %.splatinsert60, <4 x float> undef, <4 x i32> zeroinitializer |
| 1260 |
%i61 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i60, <4 x float> %.splat61, <4 x float> %i58) |
| 1261 |
%arrayidx62 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 13 |
| 1262 |
%i63 = load <4 x float>, ptr %arrayidx62, align 4 |
| 1263 |
%.splatinsert63 = insertelement <4 x float> undef, float %i44, i32 0 |
| 1264 |
%.splat64 = shufflevector <4 x float> %.splatinsert63, <4 x float> undef, <4 x i32> zeroinitializer |
| 1265 |
%i64 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i63, <4 x float> %.splat64, <4 x float> %i61) |
| 1266 |
%arrayidx65 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 14 |
| 1267 |
%i66 = load <4 x float>, ptr %arrayidx65, align 4 |
| 1268 |
%.splatinsert66 = insertelement <4 x float> undef, float %i45, i32 0 |
| 1269 |
%.splat67 = shufflevector <4 x float> %.splatinsert66, <4 x float> undef, <4 x i32> zeroinitializer |
| 1270 |
%i67 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i66, <4 x float> %.splat67, <4 x float> %i64) |
| 1271 |
%arrayidx68 = getelementptr inbounds float, ptr %pSamples.0.pn202, i32 15 |
| 1272 |
%i69 = load <4 x float>, ptr %arrayidx68, align 4 |
| 1273 |
%.splatinsert69 = insertelement <4 x float> undef, float %i46, i32 0 |
| 1274 |
%.splat70 = shufflevector <4 x float> %.splatinsert69, <4 x float> undef, <4 x i32> zeroinitializer |
| 1275 |
%i70 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i69, <4 x float> %.splat70, <4 x float> %i67) |
| 1276 |
%inc = add nuw nsw i32 %i.0204, 1 |
| 1277 |
%pCoeffsCur.0 = getelementptr inbounds float, ptr %pCoeffsCur.0206, i32 8 |
| 1278 |
%pSamples.1 = getelementptr inbounds float, ptr %pSamples.1207, i32 8 |
| 1279 |
%exitcond = icmp eq i32 %inc, %smax |
| 1280 |
br i1 %exitcond, label %for.end, label %for.body |
| 1281 |
|
| 1282 |
for.end: ; preds = %for.body, %while.body |
| 1283 |
%vecAcc0.0.lcssa = phi <4 x float> [ %i38, %while.body ], [ %i70, %for.body ] |
| 1284 |
%pCoeffsCur.0.lcssa = phi ptr [ %pCoeffsCur.0199, %while.body ], [ %pCoeffsCur.0, %for.body ] |
| 1285 |
%pSamples.1.lcssa = phi ptr [ %pSamples.1200, %while.body ], [ %pSamples.1, %for.body ] |
| 1286 |
br i1 %cmp74210, label %while.end, label %while.body76 |
| 1287 |
|
| 1288 |
while.body76: ; preds = %while.body76, %for.end |
| 1289 |
%pCoeffsCur.1214 = phi ptr [ %incdec.ptr77, %while.body76 ], [ %pCoeffsCur.0.lcssa, %for.end ] |
| 1290 |
%vecAcc0.1213 = phi <4 x float> [ %i74, %while.body76 ], [ %vecAcc0.0.lcssa, %for.end ] |
| 1291 |
%numCnt.0212 = phi i32 [ %dec, %while.body76 ], [ %and, %for.end ] |
| 1292 |
%pSamples.2211 = phi ptr [ %incdec.ptr80, %while.body76 ], [ %pSamples.1.lcssa, %for.end ] |
| 1293 |
%incdec.ptr77 = getelementptr inbounds float, ptr %pCoeffsCur.1214, i32 1 |
| 1294 |
%i71 = load float, ptr %pCoeffsCur.1214, align 4 |
| 1295 |
%i73 = load <4 x float>, ptr %pSamples.2211, align 4 |
| 1296 |
%.splatinsert78 = insertelement <4 x float> undef, float %i71, i32 0 |
| 1297 |
%.splat79 = shufflevector <4 x float> %.splatinsert78, <4 x float> undef, <4 x i32> zeroinitializer |
| 1298 |
%i74 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i73, <4 x float> %.splat79, <4 x float> %vecAcc0.1213) |
| 1299 |
%incdec.ptr80 = getelementptr inbounds float, ptr %pSamples.2211, i32 1 |
| 1300 |
%dec = add nsw i32 %numCnt.0212, -1 |
| 1301 |
%cmp74 = icmp sgt i32 %numCnt.0212, 1 |
| 1302 |
br i1 %cmp74, label %while.body76, label %while.end.loopexit |
| 1303 |
|
| 1304 |
while.end.loopexit: ; preds = %while.body76 |
| 1305 |
%scevgep = getelementptr float, ptr %pSamples.1.lcssa, i32 %and |
| 1306 |
br label %while.end |
| 1307 |
|
| 1308 |
while.end: ; preds = %while.end.loopexit, %for.end |
| 1309 |
%pSamples.2.lcssa = phi ptr [ %pSamples.1.lcssa, %for.end ], [ %scevgep, %while.end.loopexit ] |
| 1310 |
%vecAcc0.1.lcssa = phi <4 x float> [ %vecAcc0.0.lcssa, %for.end ], [ %i74, %while.end.loopexit ] |
| 1311 |
store <4 x float> %vecAcc0.1.lcssa, ptr %pOutput.0218, align 4 |
| 1312 |
%add.ptr81 = getelementptr inbounds float, ptr %pOutput.0218, i32 4 |
| 1313 |
%add.ptr82 = getelementptr inbounds float, ptr %pSamples.2.lcssa, i32 4 |
| 1314 |
%add.ptr83 = getelementptr inbounds float, ptr %add.ptr82, i32 %idx.neg |
| 1315 |
%dec84 = add nsw i32 %blkCnt.0222, -1 |
| 1316 |
%cmp5 = icmp eq i32 %dec84, 0 |
| 1317 |
br i1 %cmp5, label %if.end, label %while.body |
| 1318 |
|
| 1319 |
if.end: ; preds = %while.end, %if.then, %entry |
| 1320 |
ret void |
| 1321 |
} |
| 1322 |
|
| 1323 |
%struct.arm_biquad_cascade_stereo_df2T_instance_f32 = type { i8, ptr, ptr } |
| 1324 |
define arm_aapcs_vfpcc void @arm_biquad_cascade_stereo_df2T_f32(ptr nocapture readonly %arg, ptr %arg1, ptr %arg2, i32 %arg3) { |
| 1325 |
; CHECK-LABEL: arm_biquad_cascade_stereo_df2T_f32: |
| 1326 |
; CHECK: @ %bb.0: @ %bb |
| 1327 |
; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr} |
| 1328 |
; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, lr} |
| 1329 |
; CHECK-NEXT: .vsave {d8, d9, d10, d11} |
| 1330 |
; CHECK-NEXT: vpush {d8, d9, d10, d11} |
| 1331 |
; CHECK-NEXT: .pad #24 |
| 1332 |
; CHECK-NEXT: sub sp, #24 |
| 1333 |
; CHECK-NEXT: mov r8, r3 |
| 1334 |
; CHECK-NEXT: ldrb.w r12, [r0] |
| 1335 |
; CHECK-NEXT: ldrd r0, r3, [r0, #4] |
| 1336 |
; CHECK-NEXT: movs r4, #0 |
| 1337 |
; CHECK-NEXT: cmp.w r8, #0 |
| 1338 |
; CHECK-NEXT: strd r4, r4, [sp, #16] |
| 1339 |
; CHECK-NEXT: beq .LBB17_5 |
| 1340 |
; CHECK-NEXT: @ %bb.1: |
| 1341 |
; CHECK-NEXT: movs r5, #2 |
| 1342 |
; CHECK-NEXT: viwdup.u32 q0, r4, r5, #1 |
| 1343 |
; CHECK-NEXT: mov r4, sp |
| 1344 |
; CHECK-NEXT: .LBB17_2: @ %bb29 |
| 1345 |
; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 1346 |
; CHECK-NEXT: @ Child Loop BB17_3 Depth 2 |
| 1347 |
; CHECK-NEXT: ldrd r5, r7, [r3] |
| 1348 |
; CHECK-NEXT: vldrw.u32 q1, [r0] |
| 1349 |
; CHECK-NEXT: ldr r6, [r3, #12] |
| 1350 |
; CHECK-NEXT: vldr s8, [r3, #8] |
| 1351 |
; CHECK-NEXT: vstrw.32 q1, [r4] |
| 1352 |
; CHECK-NEXT: vdup.32 q1, r7 |
| 1353 |
; CHECK-NEXT: vldr s12, [r3, #16] |
| 1354 |
; CHECK-NEXT: vmov.f32 s6, s8 |
| 1355 |
; CHECK-NEXT: dls lr, r8 |
| 1356 |
; CHECK-NEXT: vmov.f32 s7, s8 |
| 1357 |
; CHECK-NEXT: vdup.32 q2, r6 |
| 1358 |
; CHECK-NEXT: vmov.f32 s10, s12 |
| 1359 |
; CHECK-NEXT: mov r7, r2 |
| 1360 |
; CHECK-NEXT: vmov.f32 s11, s12 |
| 1361 |
; CHECK-NEXT: .LBB17_3: @ %bb55 |
| 1362 |
; CHECK-NEXT: @ Parent Loop BB17_2 Depth=1 |
| 1363 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 1364 |
; CHECK-NEXT: vldrw.u32 q4, [r1, q0, uxtw #2] |
| 1365 |
; CHECK-NEXT: vldrw.u32 q5, [r4, q0, uxtw #2] |
| 1366 |
; CHECK-NEXT: vldrw.u32 q3, [sp, #8] |
| 1367 |
; CHECK-NEXT: adds r1, #8 |
| 1368 |
; CHECK-NEXT: vfma.f32 q5, q4, r5 |
| 1369 |
; CHECK-NEXT: vfma.f32 q3, q5, q2 |
| 1370 |
; CHECK-NEXT: vstmia r7!, {s20, s21} |
| 1371 |
; CHECK-NEXT: vfma.f32 q3, q4, q1 |
| 1372 |
; CHECK-NEXT: vstrw.32 q3, [r4] |
| 1373 |
; CHECK-NEXT: le lr, .LBB17_3 |
| 1374 |
; CHECK-NEXT: @ %bb.4: @ %bb75 |
| 1375 |
; CHECK-NEXT: @ in Loop: Header=BB17_2 Depth=1 |
| 1376 |
; CHECK-NEXT: adds r3, #20 |
| 1377 |
; CHECK-NEXT: subs.w r12, r12, #1 |
| 1378 |
; CHECK-NEXT: vstrb.8 q3, [r0], #16 |
| 1379 |
; CHECK-NEXT: mov r1, r2 |
| 1380 |
; CHECK-NEXT: bne .LBB17_2 |
| 1381 |
; CHECK-NEXT: b .LBB17_7 |
| 1382 |
; CHECK-NEXT: .LBB17_5: @ %bb21.preheader |
| 1383 |
; CHECK-NEXT: dls lr, r12 |
| 1384 |
; CHECK-NEXT: mov r1, sp |
| 1385 |
; CHECK-NEXT: .LBB17_6: @ %bb21 |
| 1386 |
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 1387 |
; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 1388 |
; CHECK-NEXT: vstrw.32 q0, [r1] |
| 1389 |
; CHECK-NEXT: le lr, .LBB17_6 |
| 1390 |
; CHECK-NEXT: .LBB17_7: @ %bb80 |
| 1391 |
; CHECK-NEXT: add sp, #24 |
| 1392 |
; CHECK-NEXT: vpop {d8, d9, d10, d11} |
| 1393 |
; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, pc} |
| 1394 |
bb: |
| 1395 |
%i = alloca [6 x float], align 4 |
| 1396 |
%i4 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, ptr %arg, i32 0, i32 1 |
| 1397 |
%i5 = load ptr, ptr %i4, align 4 |
| 1398 |
%i6 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, ptr %arg, i32 0, i32 2 |
| 1399 |
%i7 = load ptr, ptr %i6, align 4 |
| 1400 |
%i8 = getelementptr inbounds %struct.arm_biquad_cascade_stereo_df2T_instance_f32, ptr %arg, i32 0, i32 0 |
| 1401 |
%i9 = load i8, ptr %i8, align 4 |
| 1402 |
%i10 = zext i8 %i9 to i32 |
| 1403 |
call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %i) |
| 1404 |
%i12 = tail call { <4 x i32>, i32 } @llvm.arm.mve.viwdup.v4i32(i32 0, i32 2, i32 1) |
| 1405 |
%i13 = extractvalue { <4 x i32>, i32 } %i12, 0 |
| 1406 |
%i14 = getelementptr inbounds [6 x float], ptr %i, i32 0, i32 4 |
| 1407 |
store float 0.000000e+00, ptr %i14, align 4 |
| 1408 |
%i15 = getelementptr inbounds [6 x float], ptr %i, i32 0, i32 5 |
| 1409 |
store float 0.000000e+00, ptr %i15, align 4 |
| 1410 |
%i17 = icmp eq i32 %arg3, 0 |
| 1411 |
%i19 = getelementptr inbounds [6 x float], ptr %i, i32 0, i32 2 |
| 1412 |
br i1 %i17, label %bb21, label %bb29 |
| 1413 |
|
| 1414 |
bb21: ; preds = %bb21, %bb |
| 1415 |
%i22 = phi i32 [ %i27, %bb21 ], [ %i10, %bb ] |
| 1416 |
%i23 = phi ptr [ %i26, %bb21 ], [ %i5, %bb ] |
| 1417 |
%i25 = load <4 x float>, ptr %i23, align 8 |
| 1418 |
store <4 x float> %i25, ptr %i, align 4 |
| 1419 |
%i26 = getelementptr inbounds float, ptr %i23, i32 4 |
| 1420 |
%i27 = add i32 %i22, -1 |
| 1421 |
%i28 = icmp eq i32 %i27, 0 |
| 1422 |
br i1 %i28, label %bb80, label %bb21 |
| 1423 |
|
| 1424 |
bb29: ; preds = %bb75, %bb |
| 1425 |
%i30 = phi i32 [ %i78, %bb75 ], [ %i10, %bb ] |
| 1426 |
%i31 = phi ptr [ %i76, %bb75 ], [ %i7, %bb ] |
| 1427 |
%i32 = phi ptr [ %i77, %bb75 ], [ %i5, %bb ] |
| 1428 |
%i33 = phi ptr [ %arg2, %bb75 ], [ %arg1, %bb ] |
| 1429 |
%i34 = getelementptr inbounds float, ptr %i31, i32 1 |
| 1430 |
%i35 = load float, ptr %i31, align 4 |
| 1431 |
%i36 = getelementptr inbounds float, ptr %i31, i32 2 |
| 1432 |
%i37 = load float, ptr %i34, align 4 |
| 1433 |
%i38 = getelementptr inbounds float, ptr %i31, i32 3 |
| 1434 |
%i39 = load float, ptr %i36, align 4 |
| 1435 |
%i40 = getelementptr inbounds float, ptr %i31, i32 4 |
| 1436 |
%i41 = load float, ptr %i38, align 4 |
| 1437 |
%i42 = load float, ptr %i40, align 4 |
| 1438 |
%i43 = insertelement <4 x float> undef, float %i41, i32 0 |
| 1439 |
%i44 = shufflevector <4 x float> %i43, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef> |
| 1440 |
%i45 = insertelement <4 x float> %i44, float %i42, i32 2 |
| 1441 |
%i46 = insertelement <4 x float> %i45, float %i42, i32 3 |
| 1442 |
%i47 = insertelement <4 x float> undef, float %i37, i32 0 |
| 1443 |
%i48 = shufflevector <4 x float> %i47, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef> |
| 1444 |
%i49 = insertelement <4 x float> %i48, float %i39, i32 2 |
| 1445 |
%i50 = insertelement <4 x float> %i49, float %i39, i32 3 |
| 1446 |
%i52 = load <4 x float>, ptr %i32, align 8 |
| 1447 |
store <4 x float> %i52, ptr %i, align 4 |
| 1448 |
%i53 = insertelement <4 x float> undef, float %i35, i32 0 |
| 1449 |
%i54 = shufflevector <4 x float> %i53, <4 x float> undef, <4 x i32> zeroinitializer |
| 1450 |
br label %bb55 |
| 1451 |
|
| 1452 |
bb55: ; preds = %bb55, %bb29 |
| 1453 |
%i56 = phi ptr [ %i33, %bb29 ], [ %i72, %bb55 ] |
| 1454 |
%i57 = phi ptr [ %arg2, %bb29 ], [ %i68, %bb55 ] |
| 1455 |
%i58 = phi i32 [ %arg3, %bb29 ], [ %i73, %bb55 ] |
| 1456 |
%i59 = call <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0.v4i32(ptr nonnull %i, <4 x i32> %i13, i32 32, i32 2, i32 1) |
| 1457 |
%i60 = bitcast <4 x i32> %i59 to <4 x float> |
| 1458 |
%i62 = call <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0.v4i32(ptr %i56, <4 x i32> %i13, i32 32, i32 2, i32 1) |
| 1459 |
%i63 = bitcast <4 x i32> %i62 to <4 x float> |
| 1460 |
%i64 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i63, <4 x float> %i54, <4 x float> %i60) |
| 1461 |
%i65 = extractelement <4 x float> %i64, i32 0 |
| 1462 |
%i66 = getelementptr inbounds float, ptr %i57, i32 1 |
| 1463 |
store float %i65, ptr %i57, align 4 |
| 1464 |
%i67 = extractelement <4 x float> %i64, i32 1 |
| 1465 |
%i68 = getelementptr inbounds float, ptr %i57, i32 2 |
| 1466 |
store float %i67, ptr %i66, align 4 |
| 1467 |
%i69 = load <4 x float>, ptr %i19, align 4 |
| 1468 |
%i70 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i64, <4 x float> %i46, <4 x float> %i69) |
| 1469 |
%i71 = call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i63, <4 x float> %i50, <4 x float> %i70) |
| 1470 |
store <4 x float> %i71, ptr %i, align 4 |
| 1471 |
%i72 = getelementptr inbounds float, ptr %i56, i32 2 |
| 1472 |
%i73 = add i32 %i58, -1 |
| 1473 |
%i74 = icmp eq i32 %i73, 0 |
| 1474 |
br i1 %i74, label %bb75, label %bb55 |
| 1475 |
|
| 1476 |
bb75: ; preds = %bb55 |
| 1477 |
%i76 = getelementptr inbounds float, ptr %i31, i32 5 |
| 1478 |
store <4 x float> %i71, ptr %i32, align 4 |
| 1479 |
%i77 = getelementptr inbounds float, ptr %i32, i32 4 |
| 1480 |
%i78 = add i32 %i30, -1 |
| 1481 |
%i79 = icmp eq i32 %i78, 0 |
| 1482 |
br i1 %i79, label %bb80, label %bb29 |
| 1483 |
|
| 1484 |
bb80: ; preds = %bb75, %bb21 |
| 1485 |
call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %i) |
| 1486 |
ret void |
| 1487 |
} |
| 1488 |
|
| 1489 |
define arm_aapcs_vfpcc void @fms(ptr nocapture readonly %pSrc1, ptr nocapture readonly %pSrc2, ptr nocapture readonly %pSrc3, ptr nocapture %pDst, i32 %N, i32 %M) { |
| 1490 |
; CHECK-LABEL: fms: |
| 1491 |
; CHECK: @ %bb.0: @ %entry |
| 1492 |
; CHECK-NEXT: .save {r4, r5, r7, lr} |
| 1493 |
; CHECK-NEXT: push {r4, r5, r7, lr} |
| 1494 |
; CHECK-NEXT: ldr r4, [sp, #16] |
| 1495 |
; CHECK-NEXT: lsrs r5, r4, #2 |
| 1496 |
; CHECK-NEXT: beq .LBB18_5 |
| 1497 |
; CHECK-NEXT: @ %bb.1: @ %do.body.preheader |
| 1498 |
; CHECK-NEXT: ldr.w r12, [sp, #20] |
| 1499 |
; CHECK-NEXT: .LBB18_2: @ %do.body |
| 1500 |
; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 1501 |
; CHECK-NEXT: @ Child Loop BB18_3 Depth 2 |
| 1502 |
; CHECK-NEXT: ldr r4, [r2] |
| 1503 |
; CHECK-NEXT: dls lr, r5 |
| 1504 |
; CHECK-NEXT: vdup.32 q0, r4 |
| 1505 |
; CHECK-NEXT: .LBB18_3: @ %while.body |
| 1506 |
; CHECK-NEXT: @ Parent Loop BB18_2 Depth=1 |
| 1507 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 1508 |
; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
| 1509 |
; CHECK-NEXT: vldrw.u32 q2, [r0], #16 |
| 1510 |
; CHECK-NEXT: vfms.f32 q2, q1, q0 |
| 1511 |
; CHECK-NEXT: vstrb.8 q2, [r3], #16 |
| 1512 |
; CHECK-NEXT: le lr, .LBB18_3 |
| 1513 |
; CHECK-NEXT: @ %bb.4: @ %while.end |
| 1514 |
; CHECK-NEXT: @ in Loop: Header=BB18_2 Depth=1 |
| 1515 |
; CHECK-NEXT: adds r2, #4 |
| 1516 |
; CHECK-NEXT: subs.w r12, r12, #1 |
| 1517 |
; CHECK-NEXT: bne .LBB18_2 |
| 1518 |
; CHECK-NEXT: .LBB18_5: @ %do.end |
| 1519 |
; CHECK-NEXT: pop {r4, r5, r7, pc} |
| 1520 |
entry: |
| 1521 |
%shr = lshr i32 %N, 2 |
| 1522 |
%cmp15 = icmp eq i32 %shr, 0 |
| 1523 |
br i1 %cmp15, label %do.end, label %do.body |
| 1524 |
|
| 1525 |
do.body: ; preds = %while.end, %entry |
| 1526 |
%pDst.addr.0 = phi ptr [ %add.ptr2, %while.end ], [ %pDst, %entry ] |
| 1527 |
%M.addr.0 = phi i32 [ %dec3, %while.end ], [ %M, %entry ] |
| 1528 |
%pSrc3.addr.0 = phi ptr [ %incdec.ptr, %while.end ], [ %pSrc3, %entry ] |
| 1529 |
%pSrc2.addr.0 = phi ptr [ %add.ptr1, %while.end ], [ %pSrc2, %entry ] |
| 1530 |
%pSrc1.addr.0 = phi ptr [ %add.ptr, %while.end ], [ %pSrc1, %entry ] |
| 1531 |
%i = load float, ptr %pSrc3.addr.0, align 4 |
| 1532 |
%.splatinsert = insertelement <4 x float> undef, float %i, i32 0 |
| 1533 |
%.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer |
| 1534 |
br label %while.body |
| 1535 |
|
| 1536 |
while.body: ; preds = %while.body, %do.body |
| 1537 |
%pSrc1.addr.119 = phi ptr [ %pSrc1.addr.0, %do.body ], [ %add.ptr, %while.body ] |
| 1538 |
%pSrc2.addr.118 = phi ptr [ %pSrc2.addr.0, %do.body ], [ %add.ptr1, %while.body ] |
| 1539 |
%blkCnt.017 = phi i32 [ %shr, %do.body ], [ %dec, %while.body ] |
| 1540 |
%pDst.addr.116 = phi ptr [ %pDst.addr.0, %do.body ], [ %add.ptr2, %while.body ] |
| 1541 |
%i2 = load <4 x float>, ptr %pSrc1.addr.119, align 4 |
| 1542 |
%i4 = load <4 x float>, ptr %pSrc2.addr.118, align 4 |
| 1543 |
%i5 = fneg fast <4 x float> %i4 |
| 1544 |
%i6 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %.splat, <4 x float> %i5, <4 x float> %i2) |
| 1545 |
store <4 x float> %i6, ptr %pDst.addr.116, align 4 |
| 1546 |
%add.ptr = getelementptr inbounds float, ptr %pSrc1.addr.119, i32 4 |
| 1547 |
%add.ptr1 = getelementptr inbounds float, ptr %pSrc2.addr.118, i32 4 |
| 1548 |
%add.ptr2 = getelementptr inbounds float, ptr %pDst.addr.116, i32 4 |
| 1549 |
%dec = add nsw i32 %blkCnt.017, -1 |
| 1550 |
%cmp = icmp eq i32 %dec, 0 |
| 1551 |
br i1 %cmp, label %while.end, label %while.body |
| 1552 |
|
| 1553 |
while.end: ; preds = %while.body |
| 1554 |
%incdec.ptr = getelementptr inbounds float, ptr %pSrc3.addr.0, i32 1 |
| 1555 |
%dec3 = add i32 %M.addr.0, -1 |
| 1556 |
%cmp4 = icmp eq i32 %dec3, 0 |
| 1557 |
br i1 %cmp4, label %do.end, label %do.body |
| 1558 |
|
| 1559 |
do.end: ; preds = %while.end, %entry |
| 1560 |
ret void |
| 1561 |
} |
| 1562 |
|
| 1563 |
|
| 1564 |
%struct.arm_biquad_casd_df1_inst_f32 = type { i32, ptr, ptr } |
| 1565 |
define arm_aapcs_vfpcc void @arm_biquad_cascade_df1_f32(ptr nocapture readonly %S, ptr nocapture readonly %pSrc, ptr nocapture %pDst, i32 %blockSize) { |
| 1566 |
; CHECK-LABEL: arm_biquad_cascade_df1_f32: |
| 1567 |
; CHECK: @ %bb.0: @ %entry |
| 1568 |
; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 1569 |
; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 1570 |
; CHECK-NEXT: .pad #4 |
| 1571 |
; CHECK-NEXT: sub sp, #4 |
| 1572 |
; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15} |
| 1573 |
; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15} |
| 1574 |
; CHECK-NEXT: .pad #16 |
| 1575 |
; CHECK-NEXT: sub sp, #16 |
| 1576 |
; CHECK-NEXT: ldm.w r0, {r7, r9, r11} |
| 1577 |
; CHECK-NEXT: and r0, r3, #3 |
| 1578 |
; CHECK-NEXT: @ implicit-def: $r5 |
| 1579 |
; CHECK-NEXT: str r0, [sp, #8] @ 4-byte Spill |
| 1580 |
; CHECK-NEXT: lsrs r0, r3, #2 |
| 1581 |
; CHECK-NEXT: str r0, [sp, #4] @ 4-byte Spill |
| 1582 |
; CHECK-NEXT: b .LBB19_3 |
| 1583 |
; CHECK-NEXT: .LBB19_1: @ in Loop: Header=BB19_3 Depth=1 |
| 1584 |
; CHECK-NEXT: mov r8, r3 |
| 1585 |
; CHECK-NEXT: mov r3, r12 |
| 1586 |
; CHECK-NEXT: mov r0, r4 |
| 1587 |
; CHECK-NEXT: mov r12, r10 |
| 1588 |
; CHECK-NEXT: .LBB19_2: @ %if.end69 |
| 1589 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1590 |
; CHECK-NEXT: ldr r7, [sp, #12] @ 4-byte Reload |
| 1591 |
; CHECK-NEXT: add.w r11, r11, #128 |
| 1592 |
; CHECK-NEXT: strd r8, r0, [r9] |
| 1593 |
; CHECK-NEXT: mov r1, r2 |
| 1594 |
; CHECK-NEXT: strd r3, r12, [r9, #8] |
| 1595 |
; CHECK-NEXT: add.w r9, r9, #16 |
| 1596 |
; CHECK-NEXT: subs r7, #1 |
| 1597 |
; CHECK-NEXT: beq.w .LBB19_13 |
| 1598 |
; CHECK-NEXT: .LBB19_3: @ %do.body |
| 1599 |
; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 1600 |
; CHECK-NEXT: @ Child Loop BB19_5 Depth 2 |
| 1601 |
; CHECK-NEXT: ldr.w r10, [r9, #12] |
| 1602 |
; CHECK-NEXT: mov r6, r2 |
| 1603 |
; CHECK-NEXT: ldm.w r9, {r3, r4, r12} |
| 1604 |
; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload |
| 1605 |
; CHECK-NEXT: str r7, [sp, #12] @ 4-byte Spill |
| 1606 |
; CHECK-NEXT: wls lr, r0, .LBB19_6 |
| 1607 |
; CHECK-NEXT: @ %bb.4: @ %while.body.lr.ph |
| 1608 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1609 |
; CHECK-NEXT: mov r6, r2 |
| 1610 |
; CHECK-NEXT: .LBB19_5: @ %while.body |
| 1611 |
; CHECK-NEXT: @ Parent Loop BB19_3 Depth=1 |
| 1612 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 1613 |
; CHECK-NEXT: mov r5, r3 |
| 1614 |
; CHECK-NEXT: mov r8, r4 |
| 1615 |
; CHECK-NEXT: ldrd r4, r3, [r1, #8] |
| 1616 |
; CHECK-NEXT: vldrw.u32 q2, [r11] |
| 1617 |
; CHECK-NEXT: vldrw.u32 q6, [r11, #16] |
| 1618 |
; CHECK-NEXT: ldrd r0, r7, [r1] |
| 1619 |
; CHECK-NEXT: vmul.f32 q2, q2, r3 |
| 1620 |
; CHECK-NEXT: vldrw.u32 q7, [r11, #32] |
| 1621 |
; CHECK-NEXT: vfma.f32 q2, q6, r4 |
| 1622 |
; CHECK-NEXT: vldrw.u32 q4, [r11, #48] |
| 1623 |
; CHECK-NEXT: vfma.f32 q2, q7, r7 |
| 1624 |
; CHECK-NEXT: vldrw.u32 q5, [r11, #64] |
| 1625 |
; CHECK-NEXT: vfma.f32 q2, q4, r0 |
| 1626 |
; CHECK-NEXT: vldrw.u32 q3, [r11, #80] |
| 1627 |
; CHECK-NEXT: vfma.f32 q2, q5, r5 |
| 1628 |
; CHECK-NEXT: vldrw.u32 q1, [r11, #96] |
| 1629 |
; CHECK-NEXT: vfma.f32 q2, q3, r8 |
| 1630 |
; CHECK-NEXT: vldrw.u32 q0, [r11, #112] |
| 1631 |
; CHECK-NEXT: vfma.f32 q2, q1, r12 |
| 1632 |
; CHECK-NEXT: adds r1, #16 |
| 1633 |
; CHECK-NEXT: vfma.f32 q2, q0, r10 |
| 1634 |
; CHECK-NEXT: mov r5, r3 |
| 1635 |
; CHECK-NEXT: vmov r10, r12, d5 |
| 1636 |
; CHECK-NEXT: vstrb.8 q2, [r6], #16 |
| 1637 |
; CHECK-NEXT: le lr, .LBB19_5 |
| 1638 |
; CHECK-NEXT: .LBB19_6: @ %while.end |
| 1639 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1640 |
; CHECK-NEXT: ldr r7, [sp, #8] @ 4-byte Reload |
| 1641 |
; CHECK-NEXT: cmp r7, #0 |
| 1642 |
; CHECK-NEXT: beq .LBB19_1 |
| 1643 |
; CHECK-NEXT: @ %bb.7: @ %if.then |
| 1644 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1645 |
; CHECK-NEXT: ldrd lr, r0, [r1] |
| 1646 |
; CHECK-NEXT: vldrw.u32 q0, [r11] |
| 1647 |
; CHECK-NEXT: ldrd r8, r1, [r1, #8] |
| 1648 |
; CHECK-NEXT: vldrw.u32 q6, [r11, #16] |
| 1649 |
; CHECK-NEXT: vldrw.u32 q7, [r11, #32] |
| 1650 |
; CHECK-NEXT: vldrw.u32 q4, [r11, #48] |
| 1651 |
; CHECK-NEXT: vmul.f32 q0, q0, r1 |
| 1652 |
; CHECK-NEXT: vldrw.u32 q5, [r11, #64] |
| 1653 |
; CHECK-NEXT: vfma.f32 q0, q6, r8 |
| 1654 |
; CHECK-NEXT: vldrw.u32 q3, [r11, #80] |
| 1655 |
; CHECK-NEXT: vfma.f32 q0, q7, r0 |
| 1656 |
; CHECK-NEXT: vldrw.u32 q2, [r11, #96] |
| 1657 |
; CHECK-NEXT: vfma.f32 q0, q4, lr |
| 1658 |
; CHECK-NEXT: vldrw.u32 q1, [r11, #112] |
| 1659 |
; CHECK-NEXT: vfma.f32 q0, q5, r3 |
| 1660 |
; CHECK-NEXT: cmp r7, #1 |
| 1661 |
; CHECK-NEXT: vfma.f32 q0, q3, r4 |
| 1662 |
; CHECK-NEXT: vfma.f32 q0, q2, r12 |
| 1663 |
; CHECK-NEXT: vfma.f32 q0, q1, r10 |
| 1664 |
; CHECK-NEXT: vmov r4, s0 |
| 1665 |
; CHECK-NEXT: bne .LBB19_9 |
| 1666 |
; CHECK-NEXT: @ %bb.8: @ %if.then58 |
| 1667 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1668 |
; CHECK-NEXT: str r4, [r6] |
| 1669 |
; CHECK-NEXT: mov r8, lr |
| 1670 |
; CHECK-NEXT: mov r0, r5 |
| 1671 |
; CHECK-NEXT: mov r3, r4 |
| 1672 |
; CHECK-NEXT: b .LBB19_12 |
| 1673 |
; CHECK-NEXT: .LBB19_9: @ %if.else |
| 1674 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1675 |
; CHECK-NEXT: vmov r12, s1 |
| 1676 |
; CHECK-NEXT: cmp r7, #2 |
| 1677 |
; CHECK-NEXT: vstr s1, [r6, #4] |
| 1678 |
; CHECK-NEXT: str r4, [r6] |
| 1679 |
; CHECK-NEXT: bne .LBB19_11 |
| 1680 |
; CHECK-NEXT: @ %bb.10: @ in Loop: Header=BB19_3 Depth=1 |
| 1681 |
; CHECK-NEXT: mov r8, r0 |
| 1682 |
; CHECK-NEXT: mov r3, r12 |
| 1683 |
; CHECK-NEXT: mov r0, lr |
| 1684 |
; CHECK-NEXT: mov r12, r4 |
| 1685 |
; CHECK-NEXT: b .LBB19_12 |
| 1686 |
; CHECK-NEXT: .LBB19_11: @ %if.else64 |
| 1687 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1688 |
; CHECK-NEXT: vmov r3, s2 |
| 1689 |
; CHECK-NEXT: vstr s2, [r6, #8] |
| 1690 |
; CHECK-NEXT: .LBB19_12: @ %if.end69 |
| 1691 |
; CHECK-NEXT: @ in Loop: Header=BB19_3 Depth=1 |
| 1692 |
; CHECK-NEXT: mov r5, r1 |
| 1693 |
; CHECK-NEXT: b .LBB19_2 |
| 1694 |
; CHECK-NEXT: .LBB19_13: @ %do.end |
| 1695 |
; CHECK-NEXT: add sp, #16 |
| 1696 |
; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15} |
| 1697 |
; CHECK-NEXT: add sp, #4 |
| 1698 |
; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc} |
| 1699 |
entry: |
| 1700 |
%pState1 = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, ptr %S, i32 0, i32 1 |
| 1701 |
%i = load ptr, ptr %pState1, align 4 |
| 1702 |
%pCoeffs2 = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, ptr %S, i32 0, i32 2 |
| 1703 |
%i1 = load ptr, ptr %pCoeffs2, align 4 |
| 1704 |
%numStages = getelementptr inbounds %struct.arm_biquad_casd_df1_inst_f32, ptr %S, i32 0, i32 0 |
| 1705 |
%i2 = load i32, ptr %numStages, align 4 |
| 1706 |
%shr = lshr i32 %blockSize, 2 |
| 1707 |
%cmp201 = icmp eq i32 %shr, 0 |
| 1708 |
%and = and i32 %blockSize, 3 |
| 1709 |
%tobool = icmp eq i32 %and, 0 |
| 1710 |
%cmp57 = icmp eq i32 %and, 1 |
| 1711 |
%cmp60 = icmp eq i32 %and, 2 |
| 1712 |
br label %do.body |
| 1713 |
|
| 1714 |
do.body: ; preds = %if.end69, %entry |
| 1715 |
%pState.0 = phi ptr [ %i, %entry ], [ %incdec.ptr73, %if.end69 ] |
| 1716 |
%pCoeffs.0 = phi ptr [ %i1, %entry ], [ %add.ptr74, %if.end69 ] |
| 1717 |
%pIn.0 = phi ptr [ %pSrc, %entry ], [ %pDst, %if.end69 ] |
| 1718 |
%X3.0 = phi float [ undef, %entry ], [ %X3.2, %if.end69 ] |
| 1719 |
%stage.0 = phi i32 [ %i2, %entry ], [ %dec75, %if.end69 ] |
| 1720 |
%i3 = load float, ptr %pState.0, align 4 |
| 1721 |
%arrayidx3 = getelementptr inbounds float, ptr %pState.0, i32 1 |
| 1722 |
%i4 = load float, ptr %arrayidx3, align 4 |
| 1723 |
%arrayidx4 = getelementptr inbounds float, ptr %pState.0, i32 2 |
| 1724 |
%i5 = load float, ptr %arrayidx4, align 4 |
| 1725 |
%arrayidx5 = getelementptr inbounds float, ptr %pState.0, i32 3 |
| 1726 |
%i6 = load float, ptr %arrayidx5, align 4 |
| 1727 |
br i1 %cmp201, label %while.end, label %while.body.lr.ph |
| 1728 |
|
| 1729 |
while.body.lr.ph: ; preds = %do.body |
| 1730 |
%arrayidx9 = getelementptr inbounds float, ptr %pCoeffs.0, i32 4 |
| 1731 |
%arrayidx12 = getelementptr inbounds float, ptr %pCoeffs.0, i32 8 |
| 1732 |
%arrayidx15 = getelementptr inbounds float, ptr %pCoeffs.0, i32 12 |
| 1733 |
%arrayidx18 = getelementptr inbounds float, ptr %pCoeffs.0, i32 16 |
| 1734 |
%arrayidx21 = getelementptr inbounds float, ptr %pCoeffs.0, i32 20 |
| 1735 |
%arrayidx24 = getelementptr inbounds float, ptr %pCoeffs.0, i32 24 |
| 1736 |
%arrayidx27 = getelementptr inbounds float, ptr %pCoeffs.0, i32 28 |
| 1737 |
br label %while.body |
| 1738 |
|
| 1739 |
while.body: ; preds = %while.body, %while.body.lr.ph |
| 1740 |
%sample.0208 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ] |
| 1741 |
%pIn.1207 = phi ptr [ %pIn.0, %while.body.lr.ph ], [ %incdec.ptr8, %while.body ] |
| 1742 |
%pOut.1206 = phi ptr [ %pDst, %while.body.lr.ph ], [ %add.ptr, %while.body ] |
| 1743 |
%Yn2.0205 = phi float [ %i6, %while.body.lr.ph ], [ %i37, %while.body ] |
| 1744 |
%Yn1.0204 = phi float [ %i5, %while.body.lr.ph ], [ %i36, %while.body ] |
| 1745 |
%Xn2.0203 = phi float [ %i4, %while.body.lr.ph ], [ %i17, %while.body ] |
| 1746 |
%Xn1.0202 = phi float [ %i3, %while.body.lr.ph ], [ %i18, %while.body ] |
| 1747 |
%incdec.ptr = getelementptr inbounds float, ptr %pIn.1207, i32 1 |
| 1748 |
%i15 = load float, ptr %pIn.1207, align 4 |
| 1749 |
%incdec.ptr6 = getelementptr inbounds float, ptr %pIn.1207, i32 2 |
| 1750 |
%i16 = load float, ptr %incdec.ptr, align 4 |
| 1751 |
%incdec.ptr7 = getelementptr inbounds float, ptr %pIn.1207, i32 3 |
| 1752 |
%i17 = load float, ptr %incdec.ptr6, align 4 |
| 1753 |
%incdec.ptr8 = getelementptr inbounds float, ptr %pIn.1207, i32 4 |
| 1754 |
%i18 = load float, ptr %incdec.ptr7, align 4 |
| 1755 |
%i19 = load <4 x float>, ptr %pCoeffs.0, align 4 |
| 1756 |
%.splatinsert = insertelement <4 x float> undef, float %i18, i32 0 |
| 1757 |
%.splat = shufflevector <4 x float> %.splatinsert, <4 x float> undef, <4 x i32> zeroinitializer |
| 1758 |
%i20 = fmul fast <4 x float> %.splat, %i19 |
| 1759 |
%i21 = load <4 x float>, ptr %arrayidx9, align 4 |
| 1760 |
%.splatinsert10 = insertelement <4 x float> undef, float %i17, i32 0 |
| 1761 |
%.splat11 = shufflevector <4 x float> %.splatinsert10, <4 x float> undef, <4 x i32> zeroinitializer |
| 1762 |
%i22 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i21, <4 x float> %.splat11, <4 x float> %i20) |
| 1763 |
%i23 = load <4 x float>, ptr %arrayidx12, align 4 |
| 1764 |
%.splatinsert13 = insertelement <4 x float> undef, float %i16, i32 0 |
| 1765 |
%.splat14 = shufflevector <4 x float> %.splatinsert13, <4 x float> undef, <4 x i32> zeroinitializer |
| 1766 |
%i24 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i23, <4 x float> %.splat14, <4 x float> %i22) |
| 1767 |
%i25 = load <4 x float>, ptr %arrayidx15, align 4 |
| 1768 |
%.splatinsert16 = insertelement <4 x float> undef, float %i15, i32 0 |
| 1769 |
%.splat17 = shufflevector <4 x float> %.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer |
| 1770 |
%i26 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i25, <4 x float> %.splat17, <4 x float> %i24) |
| 1771 |
%i27 = load <4 x float>, ptr %arrayidx18, align 4 |
| 1772 |
%.splatinsert19 = insertelement <4 x float> undef, float %Xn1.0202, i32 0 |
| 1773 |
%.splat20 = shufflevector <4 x float> %.splatinsert19, <4 x float> undef, <4 x i32> zeroinitializer |
| 1774 |
%i28 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i27, <4 x float> %.splat20, <4 x float> %i26) |
| 1775 |
%i29 = load <4 x float>, ptr %arrayidx21, align 4 |
| 1776 |
%.splatinsert22 = insertelement <4 x float> undef, float %Xn2.0203, i32 0 |
| 1777 |
%.splat23 = shufflevector <4 x float> %.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer |
| 1778 |
%i30 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i29, <4 x float> %.splat23, <4 x float> %i28) |
| 1779 |
%i31 = load <4 x float>, ptr %arrayidx24, align 4 |
| 1780 |
%.splatinsert25 = insertelement <4 x float> undef, float %Yn1.0204, i32 0 |
| 1781 |
%.splat26 = shufflevector <4 x float> %.splatinsert25, <4 x float> undef, <4 x i32> zeroinitializer |
| 1782 |
%i32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i31, <4 x float> %.splat26, <4 x float> %i30) |
| 1783 |
%i33 = load <4 x float>, ptr %arrayidx27, align 4 |
| 1784 |
%.splatinsert28 = insertelement <4 x float> undef, float %Yn2.0205, i32 0 |
| 1785 |
%.splat29 = shufflevector <4 x float> %.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer |
| 1786 |
%i34 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i33, <4 x float> %.splat29, <4 x float> %i32) |
| 1787 |
store <4 x float> %i34, ptr %pOut.1206, align 4 |
| 1788 |
%add.ptr = getelementptr inbounds float, ptr %pOut.1206, i32 4 |
| 1789 |
%i36 = extractelement <4 x float> %i34, i32 3 |
| 1790 |
%i37 = extractelement <4 x float> %i34, i32 2 |
| 1791 |
%dec = add nsw i32 %sample.0208, -1 |
| 1792 |
%cmp = icmp eq i32 %dec, 0 |
| 1793 |
br i1 %cmp, label %while.end, label %while.body |
| 1794 |
|
| 1795 |
while.end: ; preds = %while.body, %do.body |
| 1796 |
%Xn1.0.lcssa = phi float [ %i3, %do.body ], [ %i18, %while.body ] |
| 1797 |
%Xn2.0.lcssa = phi float [ %i4, %do.body ], [ %i17, %while.body ] |
| 1798 |
%Yn1.0.lcssa = phi float [ %i5, %do.body ], [ %i36, %while.body ] |
| 1799 |
%Yn2.0.lcssa = phi float [ %i6, %do.body ], [ %i37, %while.body ] |
| 1800 |
%pOut.1.lcssa = phi ptr [ %pDst, %do.body ], [ %add.ptr, %while.body ] |
| 1801 |
%pIn.1.lcssa = phi ptr [ %pIn.0, %do.body ], [ %incdec.ptr8, %while.body ] |
| 1802 |
%X3.1.lcssa = phi float [ %X3.0, %do.body ], [ %i18, %while.body ] |
| 1803 |
br i1 %tobool, label %if.end69, label %if.then |
| 1804 |
|
| 1805 |
if.then: ; preds = %while.end |
| 1806 |
%incdec.ptr30 = getelementptr inbounds float, ptr %pIn.1.lcssa, i32 1 |
| 1807 |
%i38 = load float, ptr %pIn.1.lcssa, align 4 |
| 1808 |
%incdec.ptr31 = getelementptr inbounds float, ptr %pIn.1.lcssa, i32 2 |
| 1809 |
%i39 = load float, ptr %incdec.ptr30, align 4 |
| 1810 |
%incdec.ptr32 = getelementptr inbounds float, ptr %pIn.1.lcssa, i32 3 |
| 1811 |
%i40 = load float, ptr %incdec.ptr31, align 4 |
| 1812 |
%i41 = load float, ptr %incdec.ptr32, align 4 |
| 1813 |
%i43 = load <4 x float>, ptr %pCoeffs.0, align 4 |
| 1814 |
%.splatinsert34 = insertelement <4 x float> undef, float %i41, i32 0 |
| 1815 |
%.splat35 = shufflevector <4 x float> %.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer |
| 1816 |
%i44 = fmul fast <4 x float> %.splat35, %i43 |
| 1817 |
%arrayidx36 = getelementptr inbounds float, ptr %pCoeffs.0, i32 4 |
| 1818 |
%i46 = load <4 x float>, ptr %arrayidx36, align 4 |
| 1819 |
%.splatinsert37 = insertelement <4 x float> undef, float %i40, i32 0 |
| 1820 |
%.splat38 = shufflevector <4 x float> %.splatinsert37, <4 x float> undef, <4 x i32> zeroinitializer |
| 1821 |
%i47 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i46, <4 x float> %.splat38, <4 x float> %i44) |
| 1822 |
%arrayidx39 = getelementptr inbounds float, ptr %pCoeffs.0, i32 8 |
| 1823 |
%i49 = load <4 x float>, ptr %arrayidx39, align 4 |
| 1824 |
%.splatinsert40 = insertelement <4 x float> undef, float %i39, i32 0 |
| 1825 |
%.splat41 = shufflevector <4 x float> %.splatinsert40, <4 x float> undef, <4 x i32> zeroinitializer |
| 1826 |
%i50 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i49, <4 x float> %.splat41, <4 x float> %i47) |
| 1827 |
%arrayidx42 = getelementptr inbounds float, ptr %pCoeffs.0, i32 12 |
| 1828 |
%i52 = load <4 x float>, ptr %arrayidx42, align 4 |
| 1829 |
%.splatinsert43 = insertelement <4 x float> undef, float %i38, i32 0 |
| 1830 |
%.splat44 = shufflevector <4 x float> %.splatinsert43, <4 x float> undef, <4 x i32> zeroinitializer |
| 1831 |
%i53 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i52, <4 x float> %.splat44, <4 x float> %i50) |
| 1832 |
%arrayidx45 = getelementptr inbounds float, ptr %pCoeffs.0, i32 16 |
| 1833 |
%i55 = load <4 x float>, ptr %arrayidx45, align 4 |
| 1834 |
%.splatinsert46 = insertelement <4 x float> undef, float %Xn1.0.lcssa, i32 0 |
| 1835 |
%.splat47 = shufflevector <4 x float> %.splatinsert46, <4 x float> undef, <4 x i32> zeroinitializer |
| 1836 |
%i56 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i55, <4 x float> %.splat47, <4 x float> %i53) |
| 1837 |
%arrayidx48 = getelementptr inbounds float, ptr %pCoeffs.0, i32 20 |
| 1838 |
%i58 = load <4 x float>, ptr %arrayidx48, align 4 |
| 1839 |
%.splatinsert49 = insertelement <4 x float> undef, float %Xn2.0.lcssa, i32 0 |
| 1840 |
%.splat50 = shufflevector <4 x float> %.splatinsert49, <4 x float> undef, <4 x i32> zeroinitializer |
| 1841 |
%i59 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i58, <4 x float> %.splat50, <4 x float> %i56) |
| 1842 |
%arrayidx51 = getelementptr inbounds float, ptr %pCoeffs.0, i32 24 |
| 1843 |
%i61 = load <4 x float>, ptr %arrayidx51, align 4 |
| 1844 |
%.splatinsert52 = insertelement <4 x float> undef, float %Yn1.0.lcssa, i32 0 |
| 1845 |
%.splat53 = shufflevector <4 x float> %.splatinsert52, <4 x float> undef, <4 x i32> zeroinitializer |
| 1846 |
%i62 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i61, <4 x float> %.splat53, <4 x float> %i59) |
| 1847 |
%arrayidx54 = getelementptr inbounds float, ptr %pCoeffs.0, i32 28 |
| 1848 |
%i64 = load <4 x float>, ptr %arrayidx54, align 4 |
| 1849 |
%.splatinsert55 = insertelement <4 x float> undef, float %Yn2.0.lcssa, i32 0 |
| 1850 |
%.splat56 = shufflevector <4 x float> %.splatinsert55, <4 x float> undef, <4 x i32> zeroinitializer |
| 1851 |
%i65 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i64, <4 x float> %.splat56, <4 x float> %i62) |
| 1852 |
%i66 = extractelement <4 x float> %i65, i32 0 |
| 1853 |
br i1 %cmp57, label %if.then58, label %if.else |
| 1854 |
|
| 1855 |
if.then58: ; preds = %if.then |
| 1856 |
store float %i66, ptr %pOut.1.lcssa, align 4 |
| 1857 |
br label %if.end69 |
| 1858 |
|
| 1859 |
if.else: ; preds = %if.then |
| 1860 |
%incdec.ptr62 = getelementptr inbounds float, ptr %pOut.1.lcssa, i32 1 |
| 1861 |
store float %i66, ptr %pOut.1.lcssa, align 4 |
| 1862 |
%i67 = extractelement <4 x float> %i65, i32 1 |
| 1863 |
store float %i67, ptr %incdec.ptr62, align 4 |
| 1864 |
br i1 %cmp60, label %if.end69, label %if.else64 |
| 1865 |
|
| 1866 |
if.else64: ; preds = %if.else |
| 1867 |
%incdec.ptr63 = getelementptr inbounds float, ptr %pOut.1.lcssa, i32 2 |
| 1868 |
%i68 = extractelement <4 x float> %i65, i32 2 |
| 1869 |
store float %i68, ptr %incdec.ptr63, align 4 |
| 1870 |
br label %if.end69 |
| 1871 |
|
| 1872 |
if.end69: ; preds = %if.else64, %if.else, %if.then58, %while.end |
| 1873 |
%Xn1.1 = phi float [ %i38, %if.then58 ], [ %i40, %if.else64 ], [ %Xn1.0.lcssa, %while.end ], [ %i39, %if.else ] |
| 1874 |
%Xn2.1 = phi float [ %X3.1.lcssa, %if.then58 ], [ %i39, %if.else64 ], [ %Xn2.0.lcssa, %while.end ], [ %i38, %if.else ] |
| 1875 |
%Yn1.1 = phi float [ %i66, %if.then58 ], [ %i68, %if.else64 ], [ %Yn1.0.lcssa, %while.end ], [ %i67, %if.else ] |
| 1876 |
%Yn2.1 = phi float [ %Yn1.0.lcssa, %if.then58 ], [ %i67, %if.else64 ], [ %Yn2.0.lcssa, %while.end ], [ %i66, %if.else ] |
| 1877 |
%X3.2 = phi float [ %i41, %if.then58 ], [ %i41, %if.else64 ], [ %X3.1.lcssa, %while.end ], [ %i41, %if.else ] |
| 1878 |
store float %Xn1.1, ptr %pState.0, align 4 |
| 1879 |
store float %Xn2.1, ptr %arrayidx3, align 4 |
| 1880 |
store float %Yn1.1, ptr %arrayidx4, align 4 |
| 1881 |
%incdec.ptr73 = getelementptr inbounds float, ptr %pState.0, i32 4 |
| 1882 |
store float %Yn2.1, ptr %arrayidx5, align 4 |
| 1883 |
%add.ptr74 = getelementptr inbounds float, ptr %pCoeffs.0, i32 32 |
| 1884 |
%dec75 = add i32 %stage.0, -1 |
| 1885 |
%cmp76 = icmp eq i32 %dec75, 0 |
| 1886 |
br i1 %cmp76, label %do.end, label %do.body |
| 1887 |
|
| 1888 |
do.end: ; preds = %if.end69 |
| 1889 |
ret void |
| 1890 |
} |
| 1891 |
|
| 1892 |
|
| 1893 |
%struct.arm_biquad_cascade_df2T_instance_f32 = type { i8, ptr, ptr } |
| 1894 |
define void @arm_biquad_cascade_df2T_f32(ptr nocapture readonly %S, ptr nocapture readonly %pSrc, ptr nocapture %pDst, i32 %blockSize) { |
| 1895 |
; CHECK-LABEL: arm_biquad_cascade_df2T_f32: |
| 1896 |
; CHECK: @ %bb.0: @ %entry |
| 1897 |
; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr} |
| 1898 |
; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, lr} |
| 1899 |
; CHECK-NEXT: .vsave {d8, d9, d10, d11} |
| 1900 |
; CHECK-NEXT: vpush {d8, d9, d10, d11} |
| 1901 |
; CHECK-NEXT: ldrd r6, r12, [r0, #4] |
| 1902 |
; CHECK-NEXT: lsr.w r8, r3, #1 |
| 1903 |
; CHECK-NEXT: ldrb r0, [r0] |
| 1904 |
; CHECK-NEXT: vldr s0, .LCPI20_0 |
| 1905 |
; CHECK-NEXT: b .LBB20_3 |
| 1906 |
; CHECK-NEXT: .LBB20_1: @ %if.else |
| 1907 |
; CHECK-NEXT: @ in Loop: Header=BB20_3 Depth=1 |
| 1908 |
; CHECK-NEXT: vmov.f32 s6, s5 |
| 1909 |
; CHECK-NEXT: vstr s4, [r6] |
| 1910 |
; CHECK-NEXT: .LBB20_2: @ %if.end |
| 1911 |
; CHECK-NEXT: @ in Loop: Header=BB20_3 Depth=1 |
| 1912 |
; CHECK-NEXT: vstr s6, [r6, #4] |
| 1913 |
; CHECK-NEXT: add.w r12, r12, #20 |
| 1914 |
; CHECK-NEXT: adds r6, #8 |
| 1915 |
; CHECK-NEXT: subs r0, #1 |
| 1916 |
; CHECK-NEXT: mov r1, r2 |
| 1917 |
; CHECK-NEXT: beq .LBB20_8 |
| 1918 |
; CHECK-NEXT: .LBB20_3: @ %do.body |
| 1919 |
; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 1920 |
; CHECK-NEXT: @ Child Loop BB20_5 Depth 2 |
| 1921 |
; CHECK-NEXT: vldrw.u32 q3, [r12] |
| 1922 |
; CHECK-NEXT: movs r5, #0 |
| 1923 |
; CHECK-NEXT: vmov q4, q3 |
| 1924 |
; CHECK-NEXT: vshlc q4, r5, #32 |
| 1925 |
; CHECK-NEXT: vldrw.u32 q2, [r12, #8] |
| 1926 |
; CHECK-NEXT: vmov q5, q2 |
| 1927 |
; CHECK-NEXT: vshlc q5, r5, #32 |
| 1928 |
; CHECK-NEXT: vldrw.u32 q1, [r6] |
| 1929 |
; CHECK-NEXT: vmov.f32 s6, s0 |
| 1930 |
; CHECK-NEXT: mov r5, r2 |
| 1931 |
; CHECK-NEXT: vmov.f32 s7, s0 |
| 1932 |
; CHECK-NEXT: wls lr, r8, .LBB20_6 |
| 1933 |
; CHECK-NEXT: @ %bb.4: @ %while.body.preheader |
| 1934 |
; CHECK-NEXT: @ in Loop: Header=BB20_3 Depth=1 |
| 1935 |
; CHECK-NEXT: mov r5, r2 |
| 1936 |
; CHECK-NEXT: .LBB20_5: @ %while.body |
| 1937 |
; CHECK-NEXT: @ Parent Loop BB20_3 Depth=1 |
| 1938 |
; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 1939 |
; CHECK-NEXT: ldrd r7, r4, [r1], #8 |
| 1940 |
; CHECK-NEXT: vfma.f32 q1, q3, r7 |
| 1941 |
; CHECK-NEXT: vmov r7, s4 |
| 1942 |
; CHECK-NEXT: vmov.f32 s2, s4 |
| 1943 |
; CHECK-NEXT: vfma.f32 q1, q2, r7 |
| 1944 |
; CHECK-NEXT: vmov.f32 s7, s0 |
| 1945 |
; CHECK-NEXT: vfma.f32 q1, q4, r4 |
| 1946 |
; CHECK-NEXT: vmov r4, s5 |
| 1947 |
; CHECK-NEXT: vstr s5, [r5, #4] |
| 1948 |
; CHECK-NEXT: vfma.f32 q1, q5, r4 |
| 1949 |
; CHECK-NEXT: vmov.f32 s4, s6 |
| 1950 |
; CHECK-NEXT: vmov.f32 s5, s7 |
| 1951 |
; CHECK-NEXT: vmov.f32 s6, s0 |
| 1952 |
; CHECK-NEXT: vstr s2, [r5] |
| 1953 |
; CHECK-NEXT: adds r5, #8 |
| 1954 |
; CHECK-NEXT: le lr, .LBB20_5 |
| 1955 |
; CHECK-NEXT: .LBB20_6: @ %while.end |
| 1956 |
; CHECK-NEXT: @ in Loop: Header=BB20_3 Depth=1 |
| 1957 |
; CHECK-NEXT: lsls r7, r3, #31 |
| 1958 |
; CHECK-NEXT: beq .LBB20_1 |
| 1959 |
; CHECK-NEXT: @ %bb.7: @ %if.then |
| 1960 |
; CHECK-NEXT: @ in Loop: Header=BB20_3 Depth=1 |
| 1961 |
; CHECK-NEXT: ldr r1, [r1] |
| 1962 |
; CHECK-NEXT: vfma.f32 q1, q3, r1 |
| 1963 |
; CHECK-NEXT: vmov r1, s4 |
| 1964 |
; CHECK-NEXT: vstr s4, [r5] |
| 1965 |
; CHECK-NEXT: vfma.f32 q1, q2, r1 |
| 1966 |
; CHECK-NEXT: vstr s5, [r6] |
| 1967 |
; CHECK-NEXT: b .LBB20_2 |
| 1968 |
; CHECK-NEXT: .LBB20_8: @ %do.end |
| 1969 |
; CHECK-NEXT: vpop {d8, d9, d10, d11} |
| 1970 |
; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, pc} |
| 1971 |
; CHECK-NEXT: .p2align 2 |
| 1972 |
; CHECK-NEXT: @ %bb.9: |
| 1973 |
; CHECK-NEXT: .LCPI20_0: |
| 1974 |
; CHECK-NEXT: .long 0x00000000 @ float 0 |
| 1975 |
entry: |
| 1976 |
%pState1 = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, ptr %S, i32 0, i32 1 |
| 1977 |
%i = load ptr, ptr %pState1, align 4 |
| 1978 |
%numStages = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, ptr %S, i32 0, i32 0 |
| 1979 |
%i1 = load i8, ptr %numStages, align 4 |
| 1980 |
%conv = zext i8 %i1 to i32 |
| 1981 |
%pCoeffs = getelementptr inbounds %struct.arm_biquad_cascade_df2T_instance_f32, ptr %S, i32 0, i32 2 |
| 1982 |
%i2 = load ptr, ptr %pCoeffs, align 4 |
| 1983 |
%div = lshr i32 %blockSize, 1 |
| 1984 |
%cmp.not90 = icmp eq i32 %div, 0 |
| 1985 |
%and = and i32 %blockSize, 1 |
| 1986 |
%tobool.not = icmp eq i32 %and, 0 |
| 1987 |
br label %do.body |
| 1988 |
|
| 1989 |
do.body: ; preds = %if.end, %entry |
| 1990 |
%stage.0 = phi i32 [ %conv, %entry ], [ %dec23, %if.end ] |
| 1991 |
%pCurCoeffs.0 = phi ptr [ %i2, %entry ], [ %add.ptr2, %if.end ] |
| 1992 |
%pState.0 = phi ptr [ %i, %entry ], [ %pState.1, %if.end ] |
| 1993 |
%pIn.0 = phi ptr [ %pSrc, %entry ], [ %pDst, %if.end ] |
| 1994 |
%i4 = load <4 x float>, ptr %pCurCoeffs.0, align 4 |
| 1995 |
%add.ptr = getelementptr inbounds float, ptr %pCurCoeffs.0, i32 2 |
| 1996 |
%i6 = load <4 x float>, ptr %add.ptr, align 4 |
| 1997 |
%add.ptr2 = getelementptr inbounds float, ptr %pCurCoeffs.0, i32 5 |
| 1998 |
%i8 = load <4 x float>, ptr %pState.0, align 8 |
| 1999 |
%i9 = shufflevector <4 x float> %i8, <4 x float> <float poison, float poison, float 0.000000e+00, float 0.000000e+00>, <4 x i32> <i32 0, i32 1, i32 6, i32 7> |
| 2000 |
%i10 = bitcast <4 x float> %i4 to <4 x i32> |
| 2001 |
%i11 = tail call { i32, <4 x i32> } @llvm.arm.mve.vshlc.v4i32(<4 x i32> %i10, i32 0, i32 32) |
| 2002 |
%i12 = extractvalue { i32, <4 x i32> } %i11, 0 |
| 2003 |
%i13 = extractvalue { i32, <4 x i32> } %i11, 1 |
| 2004 |
%i14 = bitcast <4 x i32> %i13 to <4 x float> |
| 2005 |
%i15 = bitcast <4 x float> %i6 to <4 x i32> |
| 2006 |
%i16 = tail call { i32, <4 x i32> } @llvm.arm.mve.vshlc.v4i32(<4 x i32> %i15, i32 %i12, i32 32) |
| 2007 |
%i17 = extractvalue { i32, <4 x i32> } %i16, 1 |
| 2008 |
%i18 = bitcast <4 x i32> %i17 to <4 x float> |
| 2009 |
br i1 %cmp.not90, label %while.end, label %while.body |
| 2010 |
|
| 2011 |
while.body: ; preds = %while.body, %do.body |
| 2012 |
%pIn.194 = phi ptr [ %incdec.ptr4, %while.body ], [ %pIn.0, %do.body ] |
| 2013 |
%state.093 = phi <4 x float> [ %i30, %while.body ], [ %i9, %do.body ] |
| 2014 |
%pOut.192 = phi ptr [ %incdec.ptr12, %while.body ], [ %pDst, %do.body ] |
| 2015 |
%sample.091 = phi i32 [ %dec, %while.body ], [ %div, %do.body ] |
| 2016 |
%incdec.ptr = getelementptr inbounds float, ptr %pIn.194, i32 1 |
| 2017 |
%i19 = load float, ptr %pIn.194, align 4 |
| 2018 |
%incdec.ptr4 = getelementptr inbounds float, ptr %pIn.194, i32 2 |
| 2019 |
%i20 = load float, ptr %incdec.ptr, align 4 |
| 2020 |
%.splatinsert = insertelement <4 x float> poison, float %i19, i32 0 |
| 2021 |
%.splat = shufflevector <4 x float> %.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer |
| 2022 |
%i21 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i4, <4 x float> %.splat, <4 x float> %state.093) |
| 2023 |
%i22 = extractelement <4 x float> %i21, i32 0 |
| 2024 |
%.splat6 = shufflevector <4 x float> %i21, <4 x float> poison, <4 x i32> zeroinitializer |
| 2025 |
%i23 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i6, <4 x float> %.splat6, <4 x float> %i21) |
| 2026 |
%i24 = insertelement <4 x float> %i23, float 0.000000e+00, i32 3 |
| 2027 |
%.splatinsert7 = insertelement <4 x float> poison, float %i20, i32 0 |
| 2028 |
%.splat8 = shufflevector <4 x float> %.splatinsert7, <4 x float> poison, <4 x i32> zeroinitializer |
| 2029 |
%i25 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i14, <4 x float> %.splat8, <4 x float> %i24) |
| 2030 |
%i26 = extractelement <4 x float> %i25, i32 1 |
| 2031 |
%.splat10 = shufflevector <4 x float> %i25, <4 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> |
| 2032 |
%i27 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i18, <4 x float> %.splat10, <4 x float> %i25) |
| 2033 |
%i28 = shufflevector <4 x float> %i27, <4 x float> undef, <4 x i32> <i32 2, i32 undef, i32 undef, i32 3> |
| 2034 |
%i29 = insertelement <4 x float> %i28, float 0.000000e+00, i32 2 |
| 2035 |
%i30 = shufflevector <4 x float> %i29, <4 x float> %i27, <4 x i32> <i32 0, i32 7, i32 2, i32 3> |
| 2036 |
%incdec.ptr11 = getelementptr inbounds float, ptr %pOut.192, i32 1 |
| 2037 |
store float %i22, ptr %pOut.192, align 4 |
| 2038 |
%incdec.ptr12 = getelementptr inbounds float, ptr %pOut.192, i32 2 |
| 2039 |
store float %i26, ptr %incdec.ptr11, align 4 |
| 2040 |
%dec = add nsw i32 %sample.091, -1 |
| 2041 |
%cmp.not = icmp eq i32 %dec, 0 |
| 2042 |
br i1 %cmp.not, label %while.end, label %while.body |
| 2043 |
|
| 2044 |
while.end: ; preds = %while.body, %do.body |
| 2045 |
%pOut.1.lcssa = phi ptr [ %pDst, %do.body ], [ %incdec.ptr12, %while.body ] |
| 2046 |
%state.0.lcssa = phi <4 x float> [ %i9, %do.body ], [ %i30, %while.body ] |
| 2047 |
%pIn.1.lcssa = phi ptr [ %pIn.0, %do.body ], [ %incdec.ptr4, %while.body ] |
| 2048 |
br i1 %tobool.not, label %if.else, label %if.then |
| 2049 |
|
| 2050 |
if.then: ; preds = %while.end |
| 2051 |
%i31 = load float, ptr %pIn.1.lcssa, align 4 |
| 2052 |
%.splatinsert14 = insertelement <4 x float> poison, float %i31, i32 0 |
| 2053 |
%.splat15 = shufflevector <4 x float> %.splatinsert14, <4 x float> poison, <4 x i32> zeroinitializer |
| 2054 |
%i32 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i4, <4 x float> %.splat15, <4 x float> %state.0.lcssa) |
| 2055 |
%i33 = extractelement <4 x float> %i32, i32 0 |
| 2056 |
%.splat17 = shufflevector <4 x float> %i32, <4 x float> poison, <4 x i32> zeroinitializer |
| 2057 |
%i34 = tail call fast <4 x float> @llvm.fma.v4f32(<4 x float> %i6, <4 x float> %.splat17, <4 x float> %i32) |
| 2058 |
store float %i33, ptr %pOut.1.lcssa, align 4 |
| 2059 |
%i35 = extractelement <4 x float> %i34, i32 1 |
| 2060 |
store float %i35, ptr %pState.0, align 4 |
| 2061 |
%i36 = extractelement <4 x float> %i34, i32 2 |
| 2062 |
br label %if.end |
| 2063 |
|
| 2064 |
if.else: ; preds = %while.end |
| 2065 |
%i37 = extractelement <4 x float> %state.0.lcssa, i32 0 |
| 2066 |
store float %i37, ptr %pState.0, align 4 |
| 2067 |
%i38 = extractelement <4 x float> %state.0.lcssa, i32 1 |
| 2068 |
br label %if.end |
| 2069 |
|
| 2070 |
if.end: ; preds = %if.else, %if.then |
| 2071 |
%.sink = phi float [ %i38, %if.else ], [ %i36, %if.then ] |
| 2072 |
%i39 = getelementptr inbounds float, ptr %pState.0, i32 1 |
| 2073 |
store float %.sink, ptr %i39, align 4 |
| 2074 |
%pState.1 = getelementptr inbounds float, ptr %pState.0, i32 2 |
| 2075 |
%dec23 = add i32 %stage.0, -1 |
| 2076 |
%cmp24.not = icmp eq i32 %dec23, 0 |
| 2077 |
br i1 %cmp24.not, label %do.end, label %do.body |
| 2078 |
|
| 2079 |
do.end: ; preds = %if.end |
| 2080 |
ret void |
| 2081 |
} |
| 2082 |
|
| 2083 |
define arm_aapcs_vfpcc float @vecAddAcrossF32Mve(<4 x float> %in) { |
| 2084 |
; CHECK-LABEL: vecAddAcrossF32Mve: |
| 2085 |
; CHECK: @ %bb.0: @ %entry |
| 2086 |
; CHECK-NEXT: vadd.f32 s0, s0, s1 |
| 2087 |
; CHECK-NEXT: vadd.f32 s0, s0, s2 |
| 2088 |
; CHECK-NEXT: vadd.f32 s0, s0, s3 |
| 2089 |
; CHECK-NEXT: bx lr |
| 2090 |
entry: |
| 2091 |
%i = extractelement <4 x float> %in, i32 0 |
| 2092 |
%i1 = extractelement <4 x float> %in, i32 1 |
| 2093 |
%add = fadd fast float %i, %i1 |
| 2094 |
%i2 = extractelement <4 x float> %in, i32 2 |
| 2095 |
%add1 = fadd fast float %add, %i2 |
| 2096 |
%i3 = extractelement <4 x float> %in, i32 3 |
| 2097 |
%add2 = fadd fast float %add1, %i3 |
| 2098 |
ret float %add2 |
| 2099 |
} |
| 2100 |
|
| 2101 |
|
| 2102 |
declare { i32, <4 x i32> } @llvm.arm.mve.vshlc.v4i32(<4 x i32>, i32, i32) #1 |
| 2103 |
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) |
| 2104 |
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) |
| 2105 |
declare { <4 x i32>, i32 } @llvm.arm.mve.viwdup.v4i32(i32, i32, i32) |
| 2106 |
declare <4 x i32> @llvm.arm.mve.vldr.gather.offset.v4i32.p0.v4i32(ptr, <4 x i32>, i32, i32, i32) |
| 2107 |
declare void @llvm.assume(i1) |
| 2108 |
declare <4 x i1> @llvm.arm.mve.vctp32(i32) |
| 2109 |
declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>) |
| 2110 |
declare void @llvm.masked.store.v4f32.p0(<4 x float>, ptr, i32 immarg, <4 x i1>) |