David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
David Green | eecba95 | 2020-04-22 16:33:11 +0100 | [diff] [blame^] | 2 | ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 3 | |
| 4 | define arm_aapcs_vfpcc void @test_fadd(half* noalias nocapture readonly %A, half *%BB, half* noalias nocapture %C, i32 %n) { |
| 5 | ; CHECK-LABEL: test_fadd: |
| 6 | ; CHECK: @ %bb.0: @ %entry |
| 7 | ; CHECK-NEXT: cmp r3, #1 |
| 8 | ; CHECK-NEXT: it lt |
| 9 | ; CHECK-NEXT: bxlt lr |
| 10 | ; CHECK-NEXT: vldr.16 s0, [r1] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 11 | ; CHECK-NEXT: vmov.f16 r1, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 12 | ; CHECK-NEXT: .LBB0_1: @ %vector.body |
| 13 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 14 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 15 | ; CHECK-NEXT: subs r3, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 16 | ; CHECK-NEXT: vadd.f16 q0, q0, r1 |
| 17 | ; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 18 | ; CHECK-NEXT: bne .LBB0_1 |
| 19 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 20 | ; CHECK-NEXT: bx lr |
| 21 | entry: |
| 22 | %B = load half, half* %BB |
| 23 | %0 = and i32 %n, 7 |
| 24 | %cmp = icmp eq i32 %0, 0 |
| 25 | tail call void @llvm.assume(i1 %cmp) |
| 26 | %cmp18 = icmp sgt i32 %n, 0 |
| 27 | br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 28 | |
| 29 | vector.ph: ; preds = %entry |
| 30 | %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0 |
| 31 | %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer |
| 32 | br label %vector.body |
| 33 | |
| 34 | vector.body: ; preds = %vector.body, %vector.ph |
| 35 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 36 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 37 | %2 = bitcast half* %1 to <8 x half>* |
| 38 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 39 | %3 = fadd fast <8 x half> %wide.load, %broadcast.splat11 |
| 40 | %4 = getelementptr inbounds half, half* %C, i32 %index |
| 41 | %5 = bitcast half* %4 to <8 x half>* |
| 42 | store <8 x half> %3, <8 x half>* %5, align 4 |
| 43 | %index.next = add i32 %index, 8 |
| 44 | %6 = icmp eq i32 %index.next, %n |
| 45 | br i1 %6, label %for.cond.cleanup, label %vector.body |
| 46 | |
| 47 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 48 | ret void |
| 49 | } |
| 50 | |
| 51 | define arm_aapcs_vfpcc void @test_fadd_r(half* noalias nocapture readonly %A, half *%BB, half* noalias nocapture %C, i32 %n) { |
| 52 | ; CHECK-LABEL: test_fadd_r: |
| 53 | ; CHECK: @ %bb.0: @ %entry |
| 54 | ; CHECK-NEXT: cmp r3, #1 |
| 55 | ; CHECK-NEXT: it lt |
| 56 | ; CHECK-NEXT: bxlt lr |
| 57 | ; CHECK-NEXT: vldr.16 s0, [r1] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 58 | ; CHECK-NEXT: vmov.f16 r1, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 59 | ; CHECK-NEXT: .LBB1_1: @ %vector.body |
| 60 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 61 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 62 | ; CHECK-NEXT: subs r3, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 63 | ; CHECK-NEXT: vadd.f16 q0, q0, r1 |
| 64 | ; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 65 | ; CHECK-NEXT: bne .LBB1_1 |
| 66 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 67 | ; CHECK-NEXT: bx lr |
| 68 | entry: |
| 69 | %B = load half, half* %BB |
| 70 | %0 = and i32 %n, 7 |
| 71 | %cmp = icmp eq i32 %0, 0 |
| 72 | tail call void @llvm.assume(i1 %cmp) |
| 73 | %cmp18 = icmp sgt i32 %n, 0 |
| 74 | br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 75 | |
| 76 | vector.ph: ; preds = %entry |
| 77 | %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0 |
| 78 | %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer |
| 79 | br label %vector.body |
| 80 | |
| 81 | vector.body: ; preds = %vector.body, %vector.ph |
| 82 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 83 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 84 | %2 = bitcast half* %1 to <8 x half>* |
| 85 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 86 | %3 = fadd fast <8 x half> %broadcast.splat11, %wide.load |
| 87 | %4 = getelementptr inbounds half, half* %C, i32 %index |
| 88 | %5 = bitcast half* %4 to <8 x half>* |
| 89 | store <8 x half> %3, <8 x half>* %5, align 4 |
| 90 | %index.next = add i32 %index, 8 |
| 91 | %6 = icmp eq i32 %index.next, %n |
| 92 | br i1 %6, label %for.cond.cleanup, label %vector.body |
| 93 | |
| 94 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 95 | ret void |
| 96 | } |
| 97 | |
| 98 | define arm_aapcs_vfpcc void @test_fmul(half* noalias nocapture readonly %A, half *%BB, half* noalias nocapture %C, i32 %n) { |
| 99 | ; CHECK-LABEL: test_fmul: |
| 100 | ; CHECK: @ %bb.0: @ %entry |
| 101 | ; CHECK-NEXT: cmp r3, #1 |
| 102 | ; CHECK-NEXT: it lt |
| 103 | ; CHECK-NEXT: bxlt lr |
| 104 | ; CHECK-NEXT: vldr.16 s0, [r1] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 105 | ; CHECK-NEXT: vmov.f16 r1, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 106 | ; CHECK-NEXT: .LBB2_1: @ %vector.body |
| 107 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 108 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 109 | ; CHECK-NEXT: subs r3, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 110 | ; CHECK-NEXT: vmul.f16 q0, q0, r1 |
| 111 | ; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 112 | ; CHECK-NEXT: bne .LBB2_1 |
| 113 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 114 | ; CHECK-NEXT: bx lr |
| 115 | entry: |
| 116 | %B = load half, half* %BB |
| 117 | %0 = and i32 %n, 7 |
| 118 | %cmp = icmp eq i32 %0, 0 |
| 119 | tail call void @llvm.assume(i1 %cmp) |
| 120 | %cmp18 = icmp sgt i32 %n, 0 |
| 121 | br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 122 | |
| 123 | vector.ph: ; preds = %entry |
| 124 | %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0 |
| 125 | %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer |
| 126 | br label %vector.body |
| 127 | |
| 128 | vector.body: ; preds = %vector.body, %vector.ph |
| 129 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 130 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 131 | %2 = bitcast half* %1 to <8 x half>* |
| 132 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 133 | %3 = fmul fast <8 x half> %wide.load, %broadcast.splat11 |
| 134 | %4 = getelementptr inbounds half, half* %C, i32 %index |
| 135 | %5 = bitcast half* %4 to <8 x half>* |
| 136 | store <8 x half> %3, <8 x half>* %5, align 4 |
| 137 | %index.next = add i32 %index, 8 |
| 138 | %6 = icmp eq i32 %index.next, %n |
| 139 | br i1 %6, label %for.cond.cleanup, label %vector.body |
| 140 | |
| 141 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 142 | ret void |
| 143 | } |
| 144 | |
| 145 | define arm_aapcs_vfpcc void @test_fmul_r(half* noalias nocapture readonly %A, half *%BB, half* noalias nocapture %C, i32 %n) { |
| 146 | ; CHECK-LABEL: test_fmul_r: |
| 147 | ; CHECK: @ %bb.0: @ %entry |
| 148 | ; CHECK-NEXT: cmp r3, #1 |
| 149 | ; CHECK-NEXT: it lt |
| 150 | ; CHECK-NEXT: bxlt lr |
| 151 | ; CHECK-NEXT: vldr.16 s0, [r1] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 152 | ; CHECK-NEXT: vmov.f16 r1, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 153 | ; CHECK-NEXT: .LBB3_1: @ %vector.body |
| 154 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 155 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 156 | ; CHECK-NEXT: subs r3, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 157 | ; CHECK-NEXT: vmul.f16 q0, q0, r1 |
| 158 | ; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 159 | ; CHECK-NEXT: bne .LBB3_1 |
| 160 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 161 | ; CHECK-NEXT: bx lr |
| 162 | entry: |
| 163 | %B = load half, half* %BB |
| 164 | %0 = and i32 %n, 7 |
| 165 | %cmp = icmp eq i32 %0, 0 |
| 166 | tail call void @llvm.assume(i1 %cmp) |
| 167 | %cmp18 = icmp sgt i32 %n, 0 |
| 168 | br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 169 | |
| 170 | vector.ph: ; preds = %entry |
| 171 | %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0 |
| 172 | %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer |
| 173 | br label %vector.body |
| 174 | |
| 175 | vector.body: ; preds = %vector.body, %vector.ph |
| 176 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 177 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 178 | %2 = bitcast half* %1 to <8 x half>* |
| 179 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 180 | %3 = fmul fast <8 x half> %broadcast.splat11, %wide.load |
| 181 | %4 = getelementptr inbounds half, half* %C, i32 %index |
| 182 | %5 = bitcast half* %4 to <8 x half>* |
| 183 | store <8 x half> %3, <8 x half>* %5, align 4 |
| 184 | %index.next = add i32 %index, 8 |
| 185 | %6 = icmp eq i32 %index.next, %n |
| 186 | br i1 %6, label %for.cond.cleanup, label %vector.body |
| 187 | |
| 188 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 189 | ret void |
| 190 | } |
| 191 | |
| 192 | define arm_aapcs_vfpcc void @test_fsub(half* noalias nocapture readonly %A, half *%BB, half* noalias nocapture %C, i32 %n) { |
| 193 | ; CHECK-LABEL: test_fsub: |
| 194 | ; CHECK: @ %bb.0: @ %entry |
| 195 | ; CHECK-NEXT: cmp r3, #1 |
| 196 | ; CHECK-NEXT: it lt |
| 197 | ; CHECK-NEXT: bxlt lr |
| 198 | ; CHECK-NEXT: vldr.16 s0, [r1] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 199 | ; CHECK-NEXT: vmov.f16 r1, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 200 | ; CHECK-NEXT: .LBB4_1: @ %vector.body |
| 201 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 202 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 203 | ; CHECK-NEXT: subs r3, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 204 | ; CHECK-NEXT: vsub.f16 q0, q0, r1 |
| 205 | ; CHECK-NEXT: vstrb.8 q0, [r2], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 206 | ; CHECK-NEXT: bne .LBB4_1 |
| 207 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 208 | ; CHECK-NEXT: bx lr |
| 209 | entry: |
| 210 | %B = load half, half* %BB |
| 211 | %0 = and i32 %n, 7 |
| 212 | %cmp = icmp eq i32 %0, 0 |
| 213 | tail call void @llvm.assume(i1 %cmp) |
| 214 | %cmp18 = icmp sgt i32 %n, 0 |
| 215 | br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 216 | |
| 217 | vector.ph: ; preds = %entry |
| 218 | %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0 |
| 219 | %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer |
| 220 | br label %vector.body |
| 221 | |
| 222 | vector.body: ; preds = %vector.body, %vector.ph |
| 223 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 224 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 225 | %2 = bitcast half* %1 to <8 x half>* |
| 226 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 227 | %3 = fsub fast <8 x half> %wide.load, %broadcast.splat11 |
| 228 | %4 = getelementptr inbounds half, half* %C, i32 %index |
| 229 | %5 = bitcast half* %4 to <8 x half>* |
| 230 | store <8 x half> %3, <8 x half>* %5, align 4 |
| 231 | %index.next = add i32 %index, 8 |
| 232 | %6 = icmp eq i32 %index.next, %n |
| 233 | br i1 %6, label %for.cond.cleanup, label %vector.body |
| 234 | |
| 235 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 236 | ret void |
| 237 | } |
| 238 | |
| 239 | define arm_aapcs_vfpcc void @test_fsub_r(half* noalias nocapture readonly %A, half *%BB, half* noalias nocapture %C, i32 %n) { |
| 240 | ; CHECK-LABEL: test_fsub_r: |
| 241 | ; CHECK: @ %bb.0: @ %entry |
| 242 | ; CHECK-NEXT: cmp r3, #1 |
| 243 | ; CHECK-NEXT: it lt |
| 244 | ; CHECK-NEXT: bxlt lr |
| 245 | ; CHECK-NEXT: vldr.16 s0, [r1] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 246 | ; CHECK-NEXT: vmov.f16 r1, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 247 | ; CHECK-NEXT: vdup.16 q0, r1 |
| 248 | ; CHECK-NEXT: .LBB5_1: @ %vector.body |
| 249 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 250 | ; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 251 | ; CHECK-NEXT: subs r3, #8 |
| 252 | ; CHECK-NEXT: vsub.f16 q1, q0, q1 |
| 253 | ; CHECK-NEXT: vstrb.8 q1, [r2], #16 |
| 254 | ; CHECK-NEXT: bne .LBB5_1 |
| 255 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 256 | ; CHECK-NEXT: bx lr |
| 257 | entry: |
| 258 | %B = load half, half* %BB |
| 259 | %0 = and i32 %n, 7 |
| 260 | %cmp = icmp eq i32 %0, 0 |
| 261 | tail call void @llvm.assume(i1 %cmp) |
| 262 | %cmp18 = icmp sgt i32 %n, 0 |
| 263 | br i1 %cmp18, label %vector.ph, label %for.cond.cleanup |
| 264 | |
| 265 | vector.ph: ; preds = %entry |
| 266 | %broadcast.splatinsert10 = insertelement <8 x half> undef, half %B, i32 0 |
| 267 | %broadcast.splat11 = shufflevector <8 x half> %broadcast.splatinsert10, <8 x half> undef, <8 x i32> zeroinitializer |
| 268 | br label %vector.body |
| 269 | |
| 270 | vector.body: ; preds = %vector.body, %vector.ph |
| 271 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 272 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 273 | %2 = bitcast half* %1 to <8 x half>* |
| 274 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 275 | %3 = fsub fast <8 x half> %broadcast.splat11, %wide.load |
| 276 | %4 = getelementptr inbounds half, half* %C, i32 %index |
| 277 | %5 = bitcast half* %4 to <8 x half>* |
| 278 | store <8 x half> %3, <8 x half>* %5, align 4 |
| 279 | %index.next = add i32 %index, 8 |
| 280 | %6 = icmp eq i32 %index.next, %n |
| 281 | br i1 %6, label %for.cond.cleanup, label %vector.body |
| 282 | |
| 283 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 284 | ret void |
| 285 | } |
| 286 | |
| 287 | |
| 288 | define arm_aapcs_vfpcc void @test_fmas(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 289 | ; CHECK-LABEL: test_fmas: |
| 290 | ; CHECK: @ %bb.0: @ %entry |
| 291 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 292 | ; CHECK-NEXT: cmp.w r12, #1 |
| 293 | ; CHECK-NEXT: it lt |
| 294 | ; CHECK-NEXT: bxlt lr |
| 295 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 296 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 297 | ; CHECK-NEXT: .LBB6_1: @ %vector.body |
| 298 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 299 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 300 | ; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 301 | ; CHECK-NEXT: subs.w r12, r12, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 302 | ; CHECK-NEXT: vfmas.f16 q1, q0, r2 |
| 303 | ; CHECK-NEXT: vstrb.8 q1, [r3], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 304 | ; CHECK-NEXT: bne .LBB6_1 |
| 305 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 306 | ; CHECK-NEXT: bx lr |
| 307 | entry: |
| 308 | %C = load half, half* %CC |
| 309 | %0 = and i32 %n, 7 |
| 310 | %cmp = icmp eq i32 %0, 0 |
| 311 | tail call void @llvm.assume(i1 %cmp) |
| 312 | %cmp110 = icmp sgt i32 %n, 0 |
| 313 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 314 | |
| 315 | vector.ph: ; preds = %entry |
| 316 | %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0 |
| 317 | %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer |
| 318 | br label %vector.body |
| 319 | |
| 320 | vector.body: ; preds = %vector.body, %vector.ph |
| 321 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 322 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 323 | %2 = bitcast half* %1 to <8 x half>* |
| 324 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 325 | %3 = getelementptr inbounds half, half* %B, i32 %index |
| 326 | %4 = bitcast half* %3 to <8 x half>* |
| 327 | %wide.load12 = load <8 x half>, <8 x half>* %4, align 4 |
| 328 | %5 = fmul fast <8 x half> %wide.load12, %wide.load |
| 329 | %6 = fadd fast <8 x half> %5, %broadcast.splat14 |
| 330 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 331 | %8 = bitcast half* %7 to <8 x half>* |
| 332 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 333 | %index.next = add i32 %index, 8 |
| 334 | %9 = icmp eq i32 %index.next, %n |
| 335 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 336 | |
| 337 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 338 | ret void |
| 339 | } |
| 340 | |
| 341 | define arm_aapcs_vfpcc void @test_fmas_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 342 | ; CHECK-LABEL: test_fmas_r: |
| 343 | ; CHECK: @ %bb.0: @ %entry |
| 344 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 345 | ; CHECK-NEXT: cmp.w r12, #1 |
| 346 | ; CHECK-NEXT: it lt |
| 347 | ; CHECK-NEXT: bxlt lr |
| 348 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 349 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 350 | ; CHECK-NEXT: .LBB7_1: @ %vector.body |
| 351 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 352 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 353 | ; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 354 | ; CHECK-NEXT: subs.w r12, r12, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 355 | ; CHECK-NEXT: vfmas.f16 q1, q0, r2 |
| 356 | ; CHECK-NEXT: vstrb.8 q1, [r3], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 357 | ; CHECK-NEXT: bne .LBB7_1 |
| 358 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 359 | ; CHECK-NEXT: bx lr |
| 360 | entry: |
| 361 | %C = load half, half* %CC |
| 362 | %0 = and i32 %n, 7 |
| 363 | %cmp = icmp eq i32 %0, 0 |
| 364 | tail call void @llvm.assume(i1 %cmp) |
| 365 | %cmp110 = icmp sgt i32 %n, 0 |
| 366 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 367 | |
| 368 | vector.ph: ; preds = %entry |
| 369 | %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0 |
| 370 | %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer |
| 371 | br label %vector.body |
| 372 | |
| 373 | vector.body: ; preds = %vector.body, %vector.ph |
| 374 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 375 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 376 | %2 = bitcast half* %1 to <8 x half>* |
| 377 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 378 | %3 = getelementptr inbounds half, half* %B, i32 %index |
| 379 | %4 = bitcast half* %3 to <8 x half>* |
| 380 | %wide.load12 = load <8 x half>, <8 x half>* %4, align 4 |
| 381 | %5 = fmul fast <8 x half> %wide.load12, %wide.load |
| 382 | %6 = fadd fast <8 x half> %broadcast.splat14, %5 |
| 383 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 384 | %8 = bitcast half* %7 to <8 x half>* |
| 385 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 386 | %index.next = add i32 %index, 8 |
| 387 | %9 = icmp eq i32 %index.next, %n |
| 388 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 389 | |
| 390 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 391 | ret void |
| 392 | } |
| 393 | |
| 394 | define arm_aapcs_vfpcc void @test_fma(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 395 | ; CHECK-LABEL: test_fma: |
| 396 | ; CHECK: @ %bb.0: @ %entry |
| 397 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 398 | ; CHECK-NEXT: cmp.w r12, #1 |
| 399 | ; CHECK-NEXT: it lt |
| 400 | ; CHECK-NEXT: bxlt lr |
| 401 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 402 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 403 | ; CHECK-NEXT: .LBB8_1: @ %vector.body |
| 404 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 405 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 406 | ; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 407 | ; CHECK-NEXT: subs.w r12, r12, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 408 | ; CHECK-NEXT: vfma.f16 q1, q0, r2 |
| 409 | ; CHECK-NEXT: vstrb.8 q1, [r3], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 410 | ; CHECK-NEXT: bne .LBB8_1 |
| 411 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 412 | ; CHECK-NEXT: bx lr |
| 413 | entry: |
| 414 | %C = load half, half* %CC |
| 415 | %0 = and i32 %n, 7 |
| 416 | %cmp = icmp eq i32 %0, 0 |
| 417 | tail call void @llvm.assume(i1 %cmp) |
| 418 | %cmp110 = icmp sgt i32 %n, 0 |
| 419 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 420 | |
| 421 | vector.ph: ; preds = %entry |
| 422 | %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0 |
| 423 | %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer |
| 424 | br label %vector.body |
| 425 | |
| 426 | vector.body: ; preds = %vector.body, %vector.ph |
| 427 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 428 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 429 | %2 = bitcast half* %1 to <8 x half>* |
| 430 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 431 | %3 = fmul fast <8 x half> %wide.load, %broadcast.splat13 |
| 432 | %4 = getelementptr inbounds half, half* %B, i32 %index |
| 433 | %5 = bitcast half* %4 to <8 x half>* |
| 434 | %wide.load14 = load <8 x half>, <8 x half>* %5, align 4 |
| 435 | %6 = fadd fast <8 x half> %3, %wide.load14 |
| 436 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 437 | %8 = bitcast half* %7 to <8 x half>* |
| 438 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 439 | %index.next = add i32 %index, 8 |
| 440 | %9 = icmp eq i32 %index.next, %n |
| 441 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 442 | |
| 443 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 444 | ret void |
| 445 | } |
| 446 | |
| 447 | define arm_aapcs_vfpcc void @test_fma_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 448 | ; CHECK-LABEL: test_fma_r: |
| 449 | ; CHECK: @ %bb.0: @ %entry |
| 450 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 451 | ; CHECK-NEXT: cmp.w r12, #1 |
| 452 | ; CHECK-NEXT: it lt |
| 453 | ; CHECK-NEXT: bxlt lr |
| 454 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 455 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 456 | ; CHECK-NEXT: .LBB9_1: @ %vector.body |
| 457 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 458 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #16 |
| 459 | ; CHECK-NEXT: vldrw.u32 q1, [r1], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 460 | ; CHECK-NEXT: subs.w r12, r12, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 461 | ; CHECK-NEXT: vfma.f16 q1, q0, r2 |
| 462 | ; CHECK-NEXT: vstrb.8 q1, [r3], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 463 | ; CHECK-NEXT: bne .LBB9_1 |
| 464 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 465 | ; CHECK-NEXT: bx lr |
| 466 | entry: |
| 467 | %C = load half, half* %CC |
| 468 | %0 = and i32 %n, 7 |
| 469 | %cmp = icmp eq i32 %0, 0 |
| 470 | tail call void @llvm.assume(i1 %cmp) |
| 471 | %cmp110 = icmp sgt i32 %n, 0 |
| 472 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 473 | |
| 474 | vector.ph: ; preds = %entry |
| 475 | %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0 |
| 476 | %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer |
| 477 | br label %vector.body |
| 478 | |
| 479 | vector.body: ; preds = %vector.body, %vector.ph |
| 480 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 481 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 482 | %2 = bitcast half* %1 to <8 x half>* |
| 483 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 484 | %3 = fmul fast <8 x half> %broadcast.splat13, %wide.load |
| 485 | %4 = getelementptr inbounds half, half* %B, i32 %index |
| 486 | %5 = bitcast half* %4 to <8 x half>* |
| 487 | %wide.load14 = load <8 x half>, <8 x half>* %5, align 4 |
| 488 | %6 = fadd fast <8 x half> %3, %wide.load14 |
| 489 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 490 | %8 = bitcast half* %7 to <8 x half>* |
| 491 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 492 | %index.next = add i32 %index, 8 |
| 493 | %9 = icmp eq i32 %index.next, %n |
| 494 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 495 | |
| 496 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 497 | ret void |
| 498 | } |
| 499 | |
| 500 | |
| 501 | define arm_aapcs_vfpcc void @test_fmss(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 502 | ; CHECK-LABEL: test_fmss: |
| 503 | ; CHECK: @ %bb.0: @ %entry |
| 504 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 505 | ; CHECK-NEXT: cmp.w r12, #1 |
| 506 | ; CHECK-NEXT: it lt |
| 507 | ; CHECK-NEXT: bxlt lr |
| 508 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 509 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 510 | ; CHECK-NEXT: vdup.16 q0, r2 |
| 511 | ; CHECK-NEXT: vneg.f16 q0, q0 |
| 512 | ; CHECK-NEXT: .LBB10_1: @ %vector.body |
| 513 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 514 | ; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 515 | ; CHECK-NEXT: vldrw.u32 q2, [r1], #16 |
| 516 | ; CHECK-NEXT: vmov q3, q0 |
| 517 | ; CHECK-NEXT: subs.w r12, r12, #8 |
| 518 | ; CHECK-NEXT: vfma.f16 q3, q2, q1 |
| 519 | ; CHECK-NEXT: vstrb.8 q3, [r3], #16 |
| 520 | ; CHECK-NEXT: bne .LBB10_1 |
| 521 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 522 | ; CHECK-NEXT: bx lr |
| 523 | entry: |
| 524 | %C = load half, half* %CC |
| 525 | %0 = and i32 %n, 7 |
| 526 | %cmp = icmp eq i32 %0, 0 |
| 527 | tail call void @llvm.assume(i1 %cmp) |
| 528 | %cmp110 = icmp sgt i32 %n, 0 |
| 529 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 530 | |
| 531 | vector.ph: ; preds = %entry |
| 532 | %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0 |
| 533 | %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer |
| 534 | br label %vector.body |
| 535 | |
| 536 | vector.body: ; preds = %vector.body, %vector.ph |
| 537 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 538 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 539 | %2 = bitcast half* %1 to <8 x half>* |
| 540 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 541 | %3 = getelementptr inbounds half, half* %B, i32 %index |
| 542 | %4 = bitcast half* %3 to <8 x half>* |
| 543 | %wide.load12 = load <8 x half>, <8 x half>* %4, align 4 |
| 544 | %5 = fmul fast <8 x half> %wide.load12, %wide.load |
| 545 | %6 = fsub fast <8 x half> %5, %broadcast.splat14 |
| 546 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 547 | %8 = bitcast half* %7 to <8 x half>* |
| 548 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 549 | %index.next = add i32 %index, 8 |
| 550 | %9 = icmp eq i32 %index.next, %n |
| 551 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 552 | |
| 553 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 554 | ret void |
| 555 | } |
| 556 | |
| 557 | define arm_aapcs_vfpcc void @test_fmss_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 558 | ; CHECK-LABEL: test_fmss_r: |
| 559 | ; CHECK: @ %bb.0: @ %entry |
| 560 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 561 | ; CHECK-NEXT: cmp.w r12, #1 |
| 562 | ; CHECK-NEXT: it lt |
| 563 | ; CHECK-NEXT: bxlt lr |
| 564 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 565 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 566 | ; CHECK-NEXT: vdup.16 q0, r2 |
| 567 | ; CHECK-NEXT: .LBB11_1: @ %vector.body |
| 568 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 569 | ; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
| 570 | ; CHECK-NEXT: vldrw.u32 q2, [r1], #16 |
| 571 | ; CHECK-NEXT: vmov q3, q0 |
| 572 | ; CHECK-NEXT: subs.w r12, r12, #8 |
| 573 | ; CHECK-NEXT: vfms.f16 q3, q2, q1 |
| 574 | ; CHECK-NEXT: vstrb.8 q3, [r3], #16 |
| 575 | ; CHECK-NEXT: bne .LBB11_1 |
| 576 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 577 | ; CHECK-NEXT: bx lr |
| 578 | entry: |
| 579 | %C = load half, half* %CC |
| 580 | %0 = and i32 %n, 7 |
| 581 | %cmp = icmp eq i32 %0, 0 |
| 582 | tail call void @llvm.assume(i1 %cmp) |
| 583 | %cmp110 = icmp sgt i32 %n, 0 |
| 584 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 585 | |
| 586 | vector.ph: ; preds = %entry |
| 587 | %broadcast.splatinsert13 = insertelement <8 x half> undef, half %C, i32 0 |
| 588 | %broadcast.splat14 = shufflevector <8 x half> %broadcast.splatinsert13, <8 x half> undef, <8 x i32> zeroinitializer |
| 589 | br label %vector.body |
| 590 | |
| 591 | vector.body: ; preds = %vector.body, %vector.ph |
| 592 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 593 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 594 | %2 = bitcast half* %1 to <8 x half>* |
| 595 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 596 | %3 = getelementptr inbounds half, half* %B, i32 %index |
| 597 | %4 = bitcast half* %3 to <8 x half>* |
| 598 | %wide.load12 = load <8 x half>, <8 x half>* %4, align 4 |
| 599 | %5 = fmul fast <8 x half> %wide.load12, %wide.load |
| 600 | %6 = fsub fast <8 x half> %broadcast.splat14, %5 |
| 601 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 602 | %8 = bitcast half* %7 to <8 x half>* |
| 603 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 604 | %index.next = add i32 %index, 8 |
| 605 | %9 = icmp eq i32 %index.next, %n |
| 606 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 607 | |
| 608 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 609 | ret void |
| 610 | } |
| 611 | |
| 612 | define arm_aapcs_vfpcc void @test_fms(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 613 | ; CHECK-LABEL: test_fms: |
| 614 | ; CHECK: @ %bb.0: @ %entry |
| 615 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 616 | ; CHECK-NEXT: cmp.w r12, #1 |
| 617 | ; CHECK-NEXT: it lt |
| 618 | ; CHECK-NEXT: bxlt lr |
| 619 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 620 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 621 | ; CHECK-NEXT: .LBB12_1: @ %vector.body |
| 622 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 623 | ; CHECK-NEXT: vldrw.u32 q0, [r1], #16 |
| 624 | ; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 625 | ; CHECK-NEXT: subs.w r12, r12, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 626 | ; CHECK-NEXT: vneg.f16 q0, q0 |
| 627 | ; CHECK-NEXT: vfma.f16 q0, q1, r2 |
| 628 | ; CHECK-NEXT: vstrb.8 q0, [r3], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 629 | ; CHECK-NEXT: bne .LBB12_1 |
| 630 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 631 | ; CHECK-NEXT: bx lr |
| 632 | entry: |
| 633 | %C = load half, half* %CC |
| 634 | %0 = and i32 %n, 7 |
| 635 | %cmp = icmp eq i32 %0, 0 |
| 636 | tail call void @llvm.assume(i1 %cmp) |
| 637 | %cmp110 = icmp sgt i32 %n, 0 |
| 638 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 639 | |
| 640 | vector.ph: ; preds = %entry |
| 641 | %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0 |
| 642 | %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer |
| 643 | br label %vector.body |
| 644 | |
| 645 | vector.body: ; preds = %vector.body, %vector.ph |
| 646 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 647 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 648 | %2 = bitcast half* %1 to <8 x half>* |
| 649 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 650 | %3 = fmul fast <8 x half> %wide.load, %broadcast.splat13 |
| 651 | %4 = getelementptr inbounds half, half* %B, i32 %index |
| 652 | %5 = bitcast half* %4 to <8 x half>* |
| 653 | %wide.load14 = load <8 x half>, <8 x half>* %5, align 4 |
| 654 | %6 = fsub fast <8 x half> %3, %wide.load14 |
| 655 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 656 | %8 = bitcast half* %7 to <8 x half>* |
| 657 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 658 | %index.next = add i32 %index, 8 |
| 659 | %9 = icmp eq i32 %index.next, %n |
| 660 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 661 | |
| 662 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 663 | ret void |
| 664 | } |
| 665 | |
| 666 | define arm_aapcs_vfpcc void @test_fms_r(half* noalias nocapture readonly %A, half* noalias nocapture readonly %B, half *%CC, half* noalias nocapture %D, i32 %n) { |
| 667 | ; CHECK-LABEL: test_fms_r: |
| 668 | ; CHECK: @ %bb.0: @ %entry |
| 669 | ; CHECK-NEXT: ldr.w r12, [sp] |
| 670 | ; CHECK-NEXT: cmp.w r12, #1 |
| 671 | ; CHECK-NEXT: it lt |
| 672 | ; CHECK-NEXT: bxlt lr |
| 673 | ; CHECK-NEXT: vldr.16 s0, [r2] |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 674 | ; CHECK-NEXT: vmov.f16 r2, s0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 675 | ; CHECK-NEXT: .LBB13_1: @ %vector.body |
| 676 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 677 | ; CHECK-NEXT: vldrw.u32 q0, [r1], #16 |
| 678 | ; CHECK-NEXT: vldrw.u32 q1, [r0], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 679 | ; CHECK-NEXT: subs.w r12, r12, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 680 | ; CHECK-NEXT: vneg.f16 q0, q0 |
| 681 | ; CHECK-NEXT: vfma.f16 q0, q1, r2 |
| 682 | ; CHECK-NEXT: vstrb.8 q0, [r3], #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 683 | ; CHECK-NEXT: bne .LBB13_1 |
| 684 | ; CHECK-NEXT: @ %bb.2: @ %for.cond.cleanup |
| 685 | ; CHECK-NEXT: bx lr |
| 686 | entry: |
| 687 | %C = load half, half* %CC |
| 688 | %0 = and i32 %n, 7 |
| 689 | %cmp = icmp eq i32 %0, 0 |
| 690 | tail call void @llvm.assume(i1 %cmp) |
| 691 | %cmp110 = icmp sgt i32 %n, 0 |
| 692 | br i1 %cmp110, label %vector.ph, label %for.cond.cleanup |
| 693 | |
| 694 | vector.ph: ; preds = %entry |
| 695 | %broadcast.splatinsert12 = insertelement <8 x half> undef, half %C, i32 0 |
| 696 | %broadcast.splat13 = shufflevector <8 x half> %broadcast.splatinsert12, <8 x half> undef, <8 x i32> zeroinitializer |
| 697 | br label %vector.body |
| 698 | |
| 699 | vector.body: ; preds = %vector.body, %vector.ph |
| 700 | %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 701 | %1 = getelementptr inbounds half, half* %A, i32 %index |
| 702 | %2 = bitcast half* %1 to <8 x half>* |
| 703 | %wide.load = load <8 x half>, <8 x half>* %2, align 4 |
| 704 | %3 = fmul fast <8 x half> %broadcast.splat13, %wide.load |
| 705 | %4 = getelementptr inbounds half, half* %B, i32 %index |
| 706 | %5 = bitcast half* %4 to <8 x half>* |
| 707 | %wide.load14 = load <8 x half>, <8 x half>* %5, align 4 |
| 708 | %6 = fsub fast <8 x half> %3, %wide.load14 |
| 709 | %7 = getelementptr inbounds half, half* %D, i32 %index |
| 710 | %8 = bitcast half* %7 to <8 x half>* |
| 711 | store <8 x half> %6, <8 x half>* %8, align 4 |
| 712 | %index.next = add i32 %index, 8 |
| 713 | %9 = icmp eq i32 %index.next, %n |
| 714 | br i1 %9, label %for.cond.cleanup, label %vector.body |
| 715 | |
| 716 | for.cond.cleanup: ; preds = %vector.body, %entry |
| 717 | ret void |
| 718 | } |
| 719 | |
| 720 | |
| 721 | define dso_local void @test_nested(half* noalias nocapture %pInT1, half* noalias nocapture readonly %pOutT1, half* noalias nocapture readonly %pPRT_in, half* noalias nocapture readnone %pPRT_pDst, i32 %numRows, i32 %numCols, i32 %l, half *%ina) local_unnamed_addr #0 { |
| 722 | ; CHECK-LABEL: test_nested: |
| 723 | ; CHECK: @ %bb.0: @ %for.body.us.preheader |
| 724 | ; CHECK-NEXT: .save {r4, r5, r6, r7, lr} |
| 725 | ; CHECK-NEXT: push {r4, r5, r6, r7, lr} |
| 726 | ; CHECK-NEXT: ldrd lr, r12, [sp, #20] |
| 727 | ; CHECK-NEXT: lsl.w r3, r12, #1 |
| 728 | ; CHECK-NEXT: dls lr, lr |
| 729 | ; CHECK-NEXT: .LBB14_1: @ %for.body.us |
| 730 | ; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 731 | ; CHECK-NEXT: @ Child Loop BB14_2 Depth 2 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 732 | ; CHECK-NEXT: ldrh r4, [r1] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 733 | ; CHECK-NEXT: mov r5, r12 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 734 | ; CHECK-NEXT: vdup.16 q0, r4 |
| 735 | ; CHECK-NEXT: movs r4, #0 |
| 736 | ; CHECK-NEXT: .LBB14_2: @ %vector.body |
| 737 | ; CHECK-NEXT: @ Parent Loop BB14_1 Depth=1 |
| 738 | ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
| 739 | ; CHECK-NEXT: adds r6, r0, r4 |
| 740 | ; CHECK-NEXT: adds r7, r2, r4 |
| 741 | ; CHECK-NEXT: vldrw.u32 q1, [r7] |
| 742 | ; CHECK-NEXT: vldrw.u32 q2, [r6] |
| 743 | ; CHECK-NEXT: adds r4, #16 |
| 744 | ; CHECK-NEXT: subs r5, #8 |
| 745 | ; CHECK-NEXT: vfms.f16 q2, q1, q0 |
| 746 | ; CHECK-NEXT: vstrw.32 q2, [r6] |
| 747 | ; CHECK-NEXT: bne .LBB14_2 |
| 748 | ; CHECK-NEXT: @ %bb.3: @ %for.cond6.for.end_crit_edge.us |
| 749 | ; CHECK-NEXT: @ in Loop: Header=BB14_1 Depth=1 |
| 750 | ; CHECK-NEXT: add r0, r3 |
| 751 | ; CHECK-NEXT: add r2, r3 |
| 752 | ; CHECK-NEXT: adds r1, #2 |
| 753 | ; CHECK-NEXT: le lr, .LBB14_1 |
| 754 | ; CHECK-NEXT: @ %bb.4: @ %for.end14 |
| 755 | ; CHECK-NEXT: pop {r4, r5, r6, r7, pc} |
| 756 | for.body.us.preheader: |
| 757 | %in = load half, half* %ina |
| 758 | %cmp = icmp sgt i32 %numRows, 0 |
| 759 | tail call void @llvm.assume(i1 %cmp) |
| 760 | %cmp1 = icmp sgt i32 %numCols, 0 |
| 761 | tail call void @llvm.assume(i1 %cmp1) |
| 762 | %rem = and i32 %numCols, 7 |
| 763 | %cmp2 = icmp eq i32 %rem, 0 |
| 764 | tail call void @llvm.assume(i1 %cmp2) |
| 765 | %cmp3 = icmp slt i32 %l, %numCols |
| 766 | tail call void @llvm.assume(i1 %cmp3) |
| 767 | br label %for.body.us |
| 768 | |
| 769 | for.body.us: ; preds = %for.cond6.for.end_crit_edge.us, %for.body.us.preheader |
| 770 | %pInT1.addr.038.us = phi half* [ %scevgep40, %for.cond6.for.end_crit_edge.us ], [ %pInT1, %for.body.us.preheader ] |
| 771 | %i.037.us = phi i32 [ %inc13.us, %for.cond6.for.end_crit_edge.us ], [ 0, %for.body.us.preheader ] |
| 772 | %pOutT1.addr.036.us = phi half* [ %incdec.ptr.us, %for.cond6.for.end_crit_edge.us ], [ %pOutT1, %for.body.us.preheader ] |
| 773 | %pPRT_in.addr.035.us = phi half* [ %scevgep, %for.cond6.for.end_crit_edge.us ], [ %pPRT_in, %for.body.us.preheader ] |
| 774 | %scevgep = getelementptr half, half* %pPRT_in.addr.035.us, i32 %numCols |
| 775 | %0 = load half, half* %pOutT1.addr.036.us, align 4 |
| 776 | %broadcast.splatinsert47 = insertelement <8 x half> undef, half %0, i32 0 |
| 777 | %broadcast.splat48 = shufflevector <8 x half> %broadcast.splatinsert47, <8 x half> undef, <8 x i32> zeroinitializer |
| 778 | br label %vector.body |
| 779 | |
| 780 | vector.body: ; preds = %vector.body, %for.body.us |
| 781 | %index = phi i32 [ 0, %for.body.us ], [ %index.next, %vector.body ] |
| 782 | %next.gep = getelementptr half, half* %pInT1.addr.038.us, i32 %index |
| 783 | %next.gep45 = getelementptr half, half* %pPRT_in.addr.035.us, i32 %index |
| 784 | %1 = bitcast half* %next.gep to <8 x half>* |
| 785 | %wide.load = load <8 x half>, <8 x half>* %1, align 4 |
| 786 | %2 = bitcast half* %next.gep45 to <8 x half>* |
| 787 | %wide.load46 = load <8 x half>, <8 x half>* %2, align 4 |
| 788 | %3 = fmul fast <8 x half> %wide.load46, %broadcast.splat48 |
| 789 | %4 = fsub fast <8 x half> %wide.load, %3 |
| 790 | store <8 x half> %4, <8 x half>* %1, align 4 |
| 791 | %index.next = add i32 %index, 8 |
| 792 | %5 = icmp eq i32 %index.next, %numCols |
| 793 | br i1 %5, label %for.cond6.for.end_crit_edge.us, label %vector.body |
| 794 | |
| 795 | for.cond6.for.end_crit_edge.us: ; preds = %vector.body |
| 796 | %incdec.ptr.us = getelementptr inbounds half, half* %pOutT1.addr.036.us, i32 1 |
| 797 | %scevgep40 = getelementptr half, half* %pInT1.addr.038.us, i32 %numCols |
| 798 | %inc13.us = add nuw nsw i32 %i.037.us, 1 |
| 799 | %exitcond41 = icmp eq i32 %inc13.us, %numRows |
| 800 | br i1 %exitcond41, label %for.end14, label %for.body.us |
| 801 | |
| 802 | for.end14: ; preds = %for.cond6.for.end_crit_edge.us |
| 803 | ret void |
| 804 | } |
| 805 | |
| 806 | %struct.arm_fir_instance_f32 = type { i16, half*, half* } |
| 807 | define void @arm_fir_f32_1_4_mve(%struct.arm_fir_instance_f32* nocapture readonly %S, half* nocapture readonly %pSrc, half* %pDst, i32 %blockSize) { |
| 808 | ; CHECK-LABEL: arm_fir_f32_1_4_mve: |
| 809 | ; CHECK: @ %bb.0: @ %entry |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 810 | ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 811 | ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 812 | ; CHECK-NEXT: .pad #16 |
| 813 | ; CHECK-NEXT: sub sp, #16 |
| 814 | ; CHECK-NEXT: ldrh r4, [r0] |
| 815 | ; CHECK-NEXT: ldr r5, [r0, #4] |
| 816 | ; CHECK-NEXT: subs r7, r4, #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 817 | ; CHECK-NEXT: cmp r7, #3 |
| 818 | ; CHECK-NEXT: bhi .LBB15_6 |
| 819 | ; CHECK-NEXT: @ %bb.1: @ %if.then |
| 820 | ; CHECK-NEXT: ldr r6, [r0, #8] |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 821 | ; CHECK-NEXT: add.w r11, r5, r7, lsl #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 822 | ; CHECK-NEXT: lsr.w lr, r3, #2 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 823 | ; CHECK-NEXT: vldr.16 s0, [r6, #6] |
| 824 | ; CHECK-NEXT: vldr.16 s2, [r6, #4] |
| 825 | ; CHECK-NEXT: vldr.16 s4, [r6, #2] |
| 826 | ; CHECK-NEXT: vldr.16 s6, [r6] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 827 | ; CHECK-NEXT: wls lr, lr, .LBB15_5 |
| 828 | ; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 829 | ; CHECK-NEXT: strd r3, r4, [sp, #8] @ 8-byte Folded Spill |
| 830 | ; CHECK-NEXT: vmov.f16 r10, s6 |
| 831 | ; CHECK-NEXT: vmov.f16 r12, s4 |
| 832 | ; CHECK-NEXT: bic r3, r3, #3 |
| 833 | ; CHECK-NEXT: vmov.f16 r4, s2 |
| 834 | ; CHECK-NEXT: str r3, [sp] @ 4-byte Spill |
| 835 | ; CHECK-NEXT: vmov.f16 r8, s0 |
| 836 | ; CHECK-NEXT: add.w r3, r2, r3, lsl #1 |
| 837 | ; CHECK-NEXT: str r3, [sp, #4] @ 4-byte Spill |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 838 | ; CHECK-NEXT: movs r6, #0 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 839 | ; CHECK-NEXT: mov r3, r5 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 840 | ; CHECK-NEXT: .LBB15_3: @ %while.body |
| 841 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 842 | ; CHECK-NEXT: add.w r9, r1, r6 |
| 843 | ; CHECK-NEXT: add.w r7, r11, r6 |
| 844 | ; CHECK-NEXT: vldrw.u32 q2, [r9] |
| 845 | ; CHECK-NEXT: vstrw.32 q2, [r7] |
| 846 | ; CHECK-NEXT: adds r7, r3, r6 |
| 847 | ; CHECK-NEXT: vldrw.u32 q2, [r7] |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 848 | ; CHECK-NEXT: adds r5, r7, #2 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 849 | ; CHECK-NEXT: vldrw.u32 q3, [r5] |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 850 | ; CHECK-NEXT: adds r5, r7, #6 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 851 | ; CHECK-NEXT: vmul.f16 q2, q2, r10 |
| 852 | ; CHECK-NEXT: vfma.f16 q2, q3, r12 |
| 853 | ; CHECK-NEXT: vldrw.u32 q3, [r7, #4] |
| 854 | ; CHECK-NEXT: vfma.f16 q2, q3, r4 |
| 855 | ; CHECK-NEXT: vldrw.u32 q3, [r5] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 856 | ; CHECK-NEXT: adds r5, r2, r6 |
| 857 | ; CHECK-NEXT: adds r6, #8 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 858 | ; CHECK-NEXT: vfma.f16 q2, q3, r8 |
| 859 | ; CHECK-NEXT: vstrw.32 q2, [r5] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 860 | ; CHECK-NEXT: le lr, .LBB15_3 |
| 861 | ; CHECK-NEXT: @ %bb.4: @ %while.end.loopexit |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 862 | ; CHECK-NEXT: ldr r2, [sp] @ 4-byte Reload |
| 863 | ; CHECK-NEXT: add r4, sp, #4 |
| 864 | ; CHECK-NEXT: add r11, r6 |
| 865 | ; CHECK-NEXT: add.w r5, r3, r2, lsl #1 |
| 866 | ; CHECK-NEXT: add.w r1, r1, r2, lsl #1 |
| 867 | ; CHECK-NEXT: ldm r4, {r2, r3, r4} @ 12-byte Folded Reload |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 868 | ; CHECK-NEXT: .LBB15_5: @ %while.end |
| 869 | ; CHECK-NEXT: and r7, r3, #3 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 870 | ; CHECK-NEXT: vldrw.u32 q2, [r1] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 871 | ; CHECK-NEXT: vctp.16 r7 |
| 872 | ; CHECK-NEXT: vpst |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 873 | ; CHECK-NEXT: vstrht.16 q2, [r11] |
| 874 | ; CHECK-NEXT: vldrw.u32 q2, [r5] |
| 875 | ; CHECK-NEXT: vmov.f16 r1, s6 |
| 876 | ; CHECK-NEXT: adds r7, r5, #2 |
| 877 | ; CHECK-NEXT: vmul.f16 q2, q2, r1 |
| 878 | ; CHECK-NEXT: vmov.f16 r1, s4 |
| 879 | ; CHECK-NEXT: vldrw.u32 q1, [r7] |
| 880 | ; CHECK-NEXT: adds r7, r5, #6 |
| 881 | ; CHECK-NEXT: vfma.f16 q2, q1, r1 |
| 882 | ; CHECK-NEXT: vldrw.u32 q1, [r5, #4] |
| 883 | ; CHECK-NEXT: vmov.f16 r1, s2 |
| 884 | ; CHECK-NEXT: vfma.f16 q2, q1, r1 |
| 885 | ; CHECK-NEXT: vmov.f16 r1, s0 |
| 886 | ; CHECK-NEXT: vldrw.u32 q0, [r7] |
| 887 | ; CHECK-NEXT: vfma.f16 q2, q0, r1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 888 | ; CHECK-NEXT: vpst |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 889 | ; CHECK-NEXT: vstrht.16 q2, [r2] |
| 890 | ; CHECK-NEXT: ldr r5, [r0, #4] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 891 | ; CHECK-NEXT: .LBB15_6: @ %if.end |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 892 | ; CHECK-NEXT: add.w r0, r5, r3, lsl #1 |
| 893 | ; CHECK-NEXT: mov r2, r5 |
| 894 | ; CHECK-NEXT: lsr.w lr, r4, #2 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 895 | ; CHECK-NEXT: wls lr, lr, .LBB15_10 |
| 896 | ; CHECK-NEXT: @ %bb.7: @ %while.body51.preheader |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 897 | ; CHECK-NEXT: bic r7, r4, #3 |
| 898 | ; CHECK-NEXT: adds r1, r7, r3 |
| 899 | ; CHECK-NEXT: mov r3, r2 |
| 900 | ; CHECK-NEXT: add.w r1, r2, r1, lsl #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 901 | ; CHECK-NEXT: .LBB15_8: @ %while.body51 |
| 902 | ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1 |
| 903 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #8 |
| 904 | ; CHECK-NEXT: vstrb.8 q0, [r3], #8 |
| 905 | ; CHECK-NEXT: le lr, .LBB15_8 |
| 906 | ; CHECK-NEXT: @ %bb.9: @ %while.end55.loopexit |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 907 | ; CHECK-NEXT: add.w r2, r2, r7, lsl #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 908 | ; CHECK-NEXT: mov r0, r1 |
| 909 | ; CHECK-NEXT: .LBB15_10: @ %while.end55 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 910 | ; CHECK-NEXT: ands r1, r4, #3 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 911 | ; CHECK-NEXT: beq .LBB15_12 |
| 912 | ; CHECK-NEXT: @ %bb.11: @ %if.then59 |
| 913 | ; CHECK-NEXT: vldrw.u32 q0, [r0] |
| 914 | ; CHECK-NEXT: vctp.16 r1 |
| 915 | ; CHECK-NEXT: vpst |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 916 | ; CHECK-NEXT: vstrht.16 q0, [r2] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 917 | ; CHECK-NEXT: .LBB15_12: @ %if.end61 |
David Green | 37b9cc8 | 2020-03-25 11:35:53 +0000 | [diff] [blame] | 918 | ; CHECK-NEXT: add sp, #16 |
| 919 | ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc} |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 920 | entry: |
| 921 | %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1 |
| 922 | %0 = load half*, half** %pState1, align 4 |
| 923 | %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2 |
| 924 | %1 = load half*, half** %pCoeffs2, align 4 |
| 925 | %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0 |
| 926 | %2 = load i16, i16* %numTaps3, align 4 |
| 927 | %conv = zext i16 %2 to i32 |
| 928 | %sub = add nsw i32 %conv, -1 |
| 929 | %cmp = icmp ult i32 %sub, 4 |
| 930 | br i1 %cmp, label %if.then, label %if.end |
| 931 | |
| 932 | if.then: ; preds = %entry |
| 933 | %arrayidx = getelementptr inbounds half, half* %0, i32 %sub |
| 934 | %incdec.ptr = getelementptr inbounds half, half* %1, i32 1 |
| 935 | %3 = load half, half* %1, align 4 |
| 936 | %incdec.ptr6 = getelementptr inbounds half, half* %1, i32 2 |
| 937 | %4 = load half, half* %incdec.ptr, align 4 |
| 938 | %incdec.ptr7 = getelementptr inbounds half, half* %1, i32 3 |
| 939 | %5 = load half, half* %incdec.ptr6, align 4 |
| 940 | %6 = load half, half* %incdec.ptr7, align 4 |
| 941 | %shr = lshr i32 %blockSize, 2 |
| 942 | %cmp9146 = icmp eq i32 %shr, 0 |
| 943 | %.pre161 = insertelement <8 x half> undef, half %3, i32 0 |
| 944 | %.pre162 = shufflevector <8 x half> %.pre161, <8 x half> undef, <8 x i32> zeroinitializer |
| 945 | %.pre163 = insertelement <8 x half> undef, half %4, i32 0 |
| 946 | %.pre164 = shufflevector <8 x half> %.pre163, <8 x half> undef, <8 x i32> zeroinitializer |
| 947 | %.pre165 = insertelement <8 x half> undef, half %5, i32 0 |
| 948 | %.pre166 = shufflevector <8 x half> %.pre165, <8 x half> undef, <8 x i32> zeroinitializer |
| 949 | %.pre167 = insertelement <8 x half> undef, half %6, i32 0 |
| 950 | %.pre168 = shufflevector <8 x half> %.pre167, <8 x half> undef, <8 x i32> zeroinitializer |
| 951 | br i1 %cmp9146, label %while.end, label %while.body.lr.ph |
| 952 | |
| 953 | while.body.lr.ph: ; preds = %if.then |
| 954 | %7 = and i32 %blockSize, -4 |
| 955 | %scevgep158 = getelementptr half, half* %pDst, i32 %7 |
| 956 | br label %while.body |
| 957 | |
| 958 | while.body: ; preds = %while.body.lr.ph, %while.body |
| 959 | %pStateCur.0151 = phi half* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.body ] |
| 960 | %pSamples.0150 = phi half* [ %0, %while.body.lr.ph ], [ %add.ptr24, %while.body ] |
| 961 | %pOutput.0149 = phi half* [ %pDst, %while.body.lr.ph ], [ %add.ptr23, %while.body ] |
| 962 | %pTempSrc.0148 = phi half* [ %pSrc, %while.body.lr.ph ], [ %add.ptr11, %while.body ] |
| 963 | %blkCnt.0147 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec, %while.body ] |
| 964 | %8 = bitcast half* %pTempSrc.0148 to <8 x half>* |
| 965 | %9 = load <8 x half>, <8 x half>* %8, align 4 |
| 966 | %10 = bitcast half* %pStateCur.0151 to <8 x half>* |
| 967 | store <8 x half> %9, <8 x half>* %10, align 4 |
| 968 | %add.ptr = getelementptr inbounds half, half* %pStateCur.0151, i32 4 |
| 969 | %add.ptr11 = getelementptr inbounds half, half* %pTempSrc.0148, i32 4 |
| 970 | %11 = bitcast half* %pSamples.0150 to <8 x half>* |
| 971 | %12 = load <8 x half>, <8 x half>* %11, align 4 |
| 972 | %13 = fmul fast <8 x half> %12, %.pre162 |
| 973 | %arrayidx12 = getelementptr inbounds half, half* %pSamples.0150, i32 1 |
| 974 | %14 = bitcast half* %arrayidx12 to <8 x half>* |
| 975 | %15 = load <8 x half>, <8 x half>* %14, align 4 |
| 976 | %mul = fmul fast <8 x half> %15, %.pre164 |
| 977 | %add = fadd fast <8 x half> %mul, %13 |
| 978 | %arrayidx13 = getelementptr inbounds half, half* %pSamples.0150, i32 2 |
| 979 | %16 = bitcast half* %arrayidx13 to <8 x half>* |
| 980 | %17 = load <8 x half>, <8 x half>* %16, align 4 |
| 981 | %mul16 = fmul fast <8 x half> %17, %.pre166 |
| 982 | %add17 = fadd fast <8 x half> %add, %mul16 |
| 983 | %arrayidx18 = getelementptr inbounds half, half* %pSamples.0150, i32 3 |
| 984 | %18 = bitcast half* %arrayidx18 to <8 x half>* |
| 985 | %19 = load <8 x half>, <8 x half>* %18, align 4 |
| 986 | %mul21 = fmul fast <8 x half> %19, %.pre168 |
| 987 | %add22 = fadd fast <8 x half> %add17, %mul21 |
| 988 | %20 = bitcast half* %pOutput.0149 to <8 x half>* |
| 989 | store <8 x half> %add22, <8 x half>* %20, align 4 |
| 990 | %add.ptr23 = getelementptr inbounds half, half* %pOutput.0149, i32 4 |
| 991 | %add.ptr24 = getelementptr inbounds half, half* %pSamples.0150, i32 4 |
| 992 | %dec = add nsw i32 %blkCnt.0147, -1 |
| 993 | %cmp9 = icmp eq i32 %dec, 0 |
| 994 | br i1 %cmp9, label %while.end.loopexit, label %while.body |
| 995 | |
| 996 | while.end.loopexit: ; preds = %while.body |
| 997 | %scevgep157 = getelementptr half, half* %pSrc, i32 %7 |
| 998 | %scevgep159 = getelementptr half, half* %0, i32 %7 |
| 999 | br label %while.end |
| 1000 | |
| 1001 | while.end: ; preds = %if.then, %while.end.loopexit |
| 1002 | %pTempSrc.0.lcssa = phi half* [ %scevgep157, %while.end.loopexit ], [ %pSrc, %if.then ] |
| 1003 | %pOutput.0.lcssa = phi half* [ %scevgep158, %while.end.loopexit ], [ %pDst, %if.then ] |
| 1004 | %pSamples.0.lcssa = phi half* [ %scevgep159, %while.end.loopexit ], [ %0, %if.then ] |
| 1005 | %pStateCur.0.lcssa = phi half* [ %add.ptr, %while.end.loopexit ], [ %arrayidx, %if.then ] |
| 1006 | %and = and i32 %blockSize, 3 |
| 1007 | %21 = tail call <8 x i1> @llvm.arm.mve.vctp16(i32 %and) |
| 1008 | %22 = bitcast half* %pTempSrc.0.lcssa to <8 x half>* |
| 1009 | %23 = load <8 x half>, <8 x half>* %22, align 4 |
| 1010 | %24 = bitcast half* %pStateCur.0.lcssa to <8 x half>* |
| 1011 | tail call void @llvm.masked.store.v8f16.p0v8f16(<8 x half> %23, <8 x half>* %24, i32 4, <8 x i1> %21) |
| 1012 | %25 = bitcast half* %pSamples.0.lcssa to <8 x half>* |
| 1013 | %26 = load <8 x half>, <8 x half>* %25, align 4 |
| 1014 | %27 = fmul fast <8 x half> %26, %.pre162 |
| 1015 | %arrayidx29 = getelementptr inbounds half, half* %pSamples.0.lcssa, i32 1 |
| 1016 | %28 = bitcast half* %arrayidx29 to <8 x half>* |
| 1017 | %29 = load <8 x half>, <8 x half>* %28, align 4 |
| 1018 | %mul32 = fmul fast <8 x half> %29, %.pre164 |
| 1019 | %add33 = fadd fast <8 x half> %mul32, %27 |
| 1020 | %arrayidx34 = getelementptr inbounds half, half* %pSamples.0.lcssa, i32 2 |
| 1021 | %30 = bitcast half* %arrayidx34 to <8 x half>* |
| 1022 | %31 = load <8 x half>, <8 x half>* %30, align 4 |
| 1023 | %mul37 = fmul fast <8 x half> %31, %.pre166 |
| 1024 | %add38 = fadd fast <8 x half> %add33, %mul37 |
| 1025 | %arrayidx39 = getelementptr inbounds half, half* %pSamples.0.lcssa, i32 3 |
| 1026 | %32 = bitcast half* %arrayidx39 to <8 x half>* |
| 1027 | %33 = load <8 x half>, <8 x half>* %32, align 4 |
| 1028 | %mul42 = fmul fast <8 x half> %33, %.pre168 |
| 1029 | %add43 = fadd fast <8 x half> %add38, %mul42 |
| 1030 | %34 = bitcast half* %pOutput.0.lcssa to <8 x half>* |
| 1031 | tail call void @llvm.masked.store.v8f16.p0v8f16(<8 x half> %add43, <8 x half>* %34, i32 4, <8 x i1> %21) |
| 1032 | %.pre = load half*, half** %pState1, align 4 |
| 1033 | br label %if.end |
| 1034 | |
| 1035 | if.end: ; preds = %while.end, %entry |
| 1036 | %35 = phi half* [ %.pre, %while.end ], [ %0, %entry ] |
| 1037 | %arrayidx45 = getelementptr inbounds half, half* %35, i32 %blockSize |
| 1038 | %shr47 = lshr i32 %conv, 2 |
| 1039 | %cmp49141 = icmp eq i32 %shr47, 0 |
| 1040 | br i1 %cmp49141, label %while.end55, label %while.body51.preheader |
| 1041 | |
| 1042 | while.body51.preheader: ; preds = %if.end |
| 1043 | %36 = and i32 %conv, 65532 |
| 1044 | %37 = add i32 %36, %blockSize |
| 1045 | %scevgep = getelementptr half, half* %35, i32 %37 |
| 1046 | br label %while.body51 |
| 1047 | |
| 1048 | while.body51: ; preds = %while.body51.preheader, %while.body51 |
| 1049 | %pTempSrc.1144 = phi half* [ %add.ptr52, %while.body51 ], [ %arrayidx45, %while.body51.preheader ] |
| 1050 | %pTempDest.0143 = phi half* [ %add.ptr53, %while.body51 ], [ %35, %while.body51.preheader ] |
| 1051 | %blkCnt.1142 = phi i32 [ %dec54, %while.body51 ], [ %shr47, %while.body51.preheader ] |
| 1052 | %38 = bitcast half* %pTempSrc.1144 to <8 x half>* |
| 1053 | %39 = load <8 x half>, <8 x half>* %38, align 4 |
| 1054 | %40 = bitcast half* %pTempDest.0143 to <8 x half>* |
| 1055 | store <8 x half> %39, <8 x half>* %40, align 4 |
| 1056 | %add.ptr52 = getelementptr inbounds half, half* %pTempSrc.1144, i32 4 |
| 1057 | %add.ptr53 = getelementptr inbounds half, half* %pTempDest.0143, i32 4 |
| 1058 | %dec54 = add nsw i32 %blkCnt.1142, -1 |
| 1059 | %cmp49 = icmp eq i32 %dec54, 0 |
| 1060 | br i1 %cmp49, label %while.end55.loopexit, label %while.body51 |
| 1061 | |
| 1062 | while.end55.loopexit: ; preds = %while.body51 |
| 1063 | %scevgep156 = getelementptr half, half* %35, i32 %36 |
| 1064 | br label %while.end55 |
| 1065 | |
| 1066 | while.end55: ; preds = %while.end55.loopexit, %if.end |
| 1067 | %pTempDest.0.lcssa = phi half* [ %35, %if.end ], [ %scevgep156, %while.end55.loopexit ] |
| 1068 | %pTempSrc.1.lcssa = phi half* [ %arrayidx45, %if.end ], [ %scevgep, %while.end55.loopexit ] |
| 1069 | %and56 = and i32 %conv, 3 |
| 1070 | %cmp57 = icmp eq i32 %and56, 0 |
| 1071 | br i1 %cmp57, label %if.end61, label %if.then59 |
| 1072 | |
| 1073 | if.then59: ; preds = %while.end55 |
| 1074 | %41 = tail call <8 x i1> @llvm.arm.mve.vctp16(i32 %and56) |
| 1075 | %42 = bitcast half* %pTempSrc.1.lcssa to <8 x half>* |
| 1076 | %43 = load <8 x half>, <8 x half>* %42, align 4 |
| 1077 | %44 = bitcast half* %pTempDest.0.lcssa to <8 x half>* |
| 1078 | tail call void @llvm.masked.store.v8f16.p0v8f16(<8 x half> %43, <8 x half>* %44, i32 4, <8 x i1> %41) |
| 1079 | br label %if.end61 |
| 1080 | |
| 1081 | if.end61: ; preds = %while.end55, %if.then59 |
| 1082 | ret void |
| 1083 | } |
| 1084 | |
| 1085 | |
| 1086 | define void @fir(%struct.arm_fir_instance_f32* nocapture readonly %S, half* nocapture readonly %pSrc, half* nocapture %pDst, i32 %blockSize) { |
| 1087 | ; CHECK-LABEL: fir: |
| 1088 | ; CHECK: @ %bb.0: @ %entry |
| 1089 | ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
| 1090 | ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr} |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1091 | ; CHECK-NEXT: .pad #28 |
| 1092 | ; CHECK-NEXT: sub sp, #28 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1093 | ; CHECK-NEXT: cmp r3, #8 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1094 | ; CHECK-NEXT: str r1, [sp, #24] @ 4-byte Spill |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1095 | ; CHECK-NEXT: blo.w .LBB16_12 |
| 1096 | ; CHECK-NEXT: @ %bb.1: @ %if.then |
| 1097 | ; CHECK-NEXT: movs r7, #0 |
| 1098 | ; CHECK-NEXT: cmp.w r7, r3, lsr #2 |
| 1099 | ; CHECK-NEXT: beq.w .LBB16_12 |
| 1100 | ; CHECK-NEXT: @ %bb.2: @ %while.body.lr.ph |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1101 | ; CHECK-NEXT: ldrh r4, [r0] |
| 1102 | ; CHECK-NEXT: movs r1, #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1103 | ; CHECK-NEXT: ldrd r5, r12, [r0, #4] |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1104 | ; CHECK-NEXT: lsr.w r11, r3, #2 |
| 1105 | ; CHECK-NEXT: sub.w r0, r4, #8 |
| 1106 | ; CHECK-NEXT: rsbs r3, r4, #0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1107 | ; CHECK-NEXT: add.w r7, r0, r0, lsr #29 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1108 | ; CHECK-NEXT: and r0, r0, #7 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1109 | ; CHECK-NEXT: asrs r6, r7, #3 |
| 1110 | ; CHECK-NEXT: cmp r6, #1 |
| 1111 | ; CHECK-NEXT: it gt |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1112 | ; CHECK-NEXT: asrgt r1, r7, #3 |
| 1113 | ; CHECK-NEXT: add.w r7, r5, r4, lsl #1 |
| 1114 | ; CHECK-NEXT: str r1, [sp] @ 4-byte Spill |
| 1115 | ; CHECK-NEXT: subs r1, r7, #2 |
| 1116 | ; CHECK-NEXT: str r3, [sp, #12] @ 4-byte Spill |
| 1117 | ; CHECK-NEXT: add.w r3, r12, #16 |
| 1118 | ; CHECK-NEXT: str r0, [sp, #20] @ 4-byte Spill |
| 1119 | ; CHECK-NEXT: adds r0, #1 |
| 1120 | ; CHECK-NEXT: str r4, [sp, #16] @ 4-byte Spill |
| 1121 | ; CHECK-NEXT: str r3, [sp, #8] @ 4-byte Spill |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1122 | ; CHECK-NEXT: str r0, [sp, #4] @ 4-byte Spill |
| 1123 | ; CHECK-NEXT: b .LBB16_4 |
| 1124 | ; CHECK-NEXT: .LBB16_3: @ %while.end |
| 1125 | ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 |
| 1126 | ; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1127 | ; CHECK-NEXT: subs.w r11, r11, #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1128 | ; CHECK-NEXT: vstrb.8 q0, [r2], #8 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1129 | ; CHECK-NEXT: add.w r0, r7, r0, lsl #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1130 | ; CHECK-NEXT: add.w r5, r0, #8 |
| 1131 | ; CHECK-NEXT: beq.w .LBB16_12 |
| 1132 | ; CHECK-NEXT: .LBB16_4: @ %while.body |
| 1133 | ; CHECK-NEXT: @ =>This Loop Header: Depth=1 |
| 1134 | ; CHECK-NEXT: @ Child Loop BB16_6 Depth 2 |
| 1135 | ; CHECK-NEXT: @ Child Loop BB16_10 Depth 2 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1136 | ; CHECK-NEXT: ldr r0, [sp, #24] @ 4-byte Reload |
| 1137 | ; CHECK-NEXT: ldrh.w lr, [r12, #14] |
| 1138 | ; CHECK-NEXT: vldrw.u32 q0, [r0], #8 |
| 1139 | ; CHECK-NEXT: ldrh.w r10, [r12, #12] |
| 1140 | ; CHECK-NEXT: ldrh.w r7, [r12, #10] |
| 1141 | ; CHECK-NEXT: ldrh.w r4, [r12, #8] |
| 1142 | ; CHECK-NEXT: ldrh.w r3, [r12, #6] |
| 1143 | ; CHECK-NEXT: ldrh.w r6, [r12, #4] |
| 1144 | ; CHECK-NEXT: ldrh.w r8, [r12, #2] |
| 1145 | ; CHECK-NEXT: ldrh.w r9, [r12] |
| 1146 | ; CHECK-NEXT: vstrb.8 q0, [r1], #8 |
David Green | b3499f5 | 2020-03-20 09:23:57 +0000 | [diff] [blame] | 1147 | ; CHECK-NEXT: vldrw.u32 q0, [r5] |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1148 | ; CHECK-NEXT: str r0, [sp, #24] @ 4-byte Spill |
| 1149 | ; CHECK-NEXT: adds r0, r5, #2 |
| 1150 | ; CHECK-NEXT: vldrw.u32 q1, [r0] |
| 1151 | ; CHECK-NEXT: vmul.f16 q0, q0, r9 |
| 1152 | ; CHECK-NEXT: adds r0, r5, #6 |
| 1153 | ; CHECK-NEXT: vfma.f16 q0, q1, r8 |
| 1154 | ; CHECK-NEXT: vldrw.u32 q1, [r5, #4] |
| 1155 | ; CHECK-NEXT: vfma.f16 q0, q1, r6 |
| 1156 | ; CHECK-NEXT: vldrw.u32 q1, [r0] |
| 1157 | ; CHECK-NEXT: add.w r0, r5, #10 |
| 1158 | ; CHECK-NEXT: vfma.f16 q0, q1, r3 |
| 1159 | ; CHECK-NEXT: vldrw.u32 q1, [r5, #8] |
| 1160 | ; CHECK-NEXT: vfma.f16 q0, q1, r4 |
| 1161 | ; CHECK-NEXT: vldrw.u32 q1, [r0] |
| 1162 | ; CHECK-NEXT: add.w r0, r5, #14 |
| 1163 | ; CHECK-NEXT: vfma.f16 q0, q1, r7 |
| 1164 | ; CHECK-NEXT: vldrw.u32 q1, [r5, #12] |
| 1165 | ; CHECK-NEXT: add.w r7, r5, #16 |
| 1166 | ; CHECK-NEXT: vfma.f16 q0, q1, r10 |
| 1167 | ; CHECK-NEXT: vldrw.u32 q1, [r0] |
| 1168 | ; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload |
| 1169 | ; CHECK-NEXT: vfma.f16 q0, q1, lr |
| 1170 | ; CHECK-NEXT: cmp r0, #16 |
| 1171 | ; CHECK-NEXT: blo .LBB16_7 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1172 | ; CHECK-NEXT: @ %bb.5: @ %for.body.preheader |
| 1173 | ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1174 | ; CHECK-NEXT: ldr.w lr, [sp] @ 4-byte Reload |
| 1175 | ; CHECK-NEXT: dls lr, lr |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1176 | ; CHECK-NEXT: ldr r6, [sp, #8] @ 4-byte Reload |
| 1177 | ; CHECK-NEXT: .LBB16_6: @ %for.body |
| 1178 | ; CHECK-NEXT: @ Parent Loop BB16_4 Depth=1 |
| 1179 | ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1180 | ; CHECK-NEXT: ldrh r0, [r6] |
| 1181 | ; CHECK-NEXT: vldrw.u32 q1, [r7] |
| 1182 | ; CHECK-NEXT: adds r3, r7, #2 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1183 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1184 | ; CHECK-NEXT: vldrw.u32 q1, [r3] |
| 1185 | ; CHECK-NEXT: ldrh r0, [r6, #2] |
| 1186 | ; CHECK-NEXT: adds r3, r7, #6 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1187 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1188 | ; CHECK-NEXT: ldrh r0, [r6, #4] |
| 1189 | ; CHECK-NEXT: vldrw.u32 q1, [r7, #4] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1190 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1191 | ; CHECK-NEXT: vldrw.u32 q1, [r3] |
| 1192 | ; CHECK-NEXT: ldrh r0, [r6, #6] |
| 1193 | ; CHECK-NEXT: add.w r3, r7, #10 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1194 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1195 | ; CHECK-NEXT: ldrh r0, [r6, #8] |
| 1196 | ; CHECK-NEXT: vldrw.u32 q1, [r7, #8] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1197 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1198 | ; CHECK-NEXT: vldrw.u32 q1, [r3] |
| 1199 | ; CHECK-NEXT: ldrh r0, [r6, #10] |
| 1200 | ; CHECK-NEXT: ldrh r3, [r6, #14] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1201 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1202 | ; CHECK-NEXT: ldrh r0, [r6, #12] |
| 1203 | ; CHECK-NEXT: vldrw.u32 q1, [r7, #12] |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1204 | ; CHECK-NEXT: adds r6, #16 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1205 | ; CHECK-NEXT: vfma.f16 q0, q1, r0 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1206 | ; CHECK-NEXT: add.w r0, r7, #14 |
| 1207 | ; CHECK-NEXT: vldrw.u32 q1, [r0] |
| 1208 | ; CHECK-NEXT: adds r7, #16 |
| 1209 | ; CHECK-NEXT: vfma.f16 q0, q1, r3 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1210 | ; CHECK-NEXT: le lr, .LBB16_6 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1211 | ; CHECK-NEXT: b .LBB16_8 |
| 1212 | ; CHECK-NEXT: .LBB16_7: @ in Loop: Header=BB16_4 Depth=1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1213 | ; CHECK-NEXT: ldr r6, [sp, #8] @ 4-byte Reload |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1214 | ; CHECK-NEXT: .LBB16_8: @ %for.end |
| 1215 | ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 |
| 1216 | ; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload |
| 1217 | ; CHECK-NEXT: cmp r0, #0 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1218 | ; CHECK-NEXT: beq.w .LBB16_3 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1219 | ; CHECK-NEXT: @ %bb.9: @ %while.body76.preheader |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1220 | ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 |
| 1221 | ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1222 | ; CHECK-NEXT: mov r5, r7 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1223 | ; CHECK-NEXT: .LBB16_10: @ %while.body76 |
| 1224 | ; CHECK-NEXT: @ Parent Loop BB16_4 Depth=1 |
| 1225 | ; CHECK-NEXT: @ => This Inner Loop Header: Depth=2 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1226 | ; CHECK-NEXT: ldrh r3, [r6], #2 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1227 | ; CHECK-NEXT: vldrh.u16 q1, [r5], #2 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1228 | ; CHECK-NEXT: subs r0, #1 |
| 1229 | ; CHECK-NEXT: vfma.f16 q0, q1, r3 |
| 1230 | ; CHECK-NEXT: cmp r0, #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1231 | ; CHECK-NEXT: bgt .LBB16_10 |
| 1232 | ; CHECK-NEXT: @ %bb.11: @ %while.end.loopexit |
| 1233 | ; CHECK-NEXT: @ in Loop: Header=BB16_4 Depth=1 |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1234 | ; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload |
| 1235 | ; CHECK-NEXT: add.w r7, r7, r0, lsl #1 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1236 | ; CHECK-NEXT: b .LBB16_3 |
| 1237 | ; CHECK-NEXT: .LBB16_12: @ %if.end |
David Green | f8c79b9 | 2020-03-24 10:14:52 +0000 | [diff] [blame] | 1238 | ; CHECK-NEXT: add sp, #28 |
David Green | 9cf920e | 2020-03-20 08:25:19 +0000 | [diff] [blame] | 1239 | ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc} |
| 1240 | entry: |
| 1241 | %pState1 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 1 |
| 1242 | %0 = load half*, half** %pState1, align 4 |
| 1243 | %pCoeffs2 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 2 |
| 1244 | %1 = load half*, half** %pCoeffs2, align 4 |
| 1245 | %numTaps3 = getelementptr inbounds %struct.arm_fir_instance_f32, %struct.arm_fir_instance_f32* %S, i32 0, i32 0 |
| 1246 | %2 = load i16, i16* %numTaps3, align 4 |
| 1247 | %conv = zext i16 %2 to i32 |
| 1248 | %cmp = icmp ugt i32 %blockSize, 7 |
| 1249 | br i1 %cmp, label %if.then, label %if.end |
| 1250 | |
| 1251 | if.then: ; preds = %entry |
| 1252 | %shr = lshr i32 %blockSize, 2 |
| 1253 | %cmp5217 = icmp eq i32 %shr, 0 |
| 1254 | br i1 %cmp5217, label %if.end, label %while.body.lr.ph |
| 1255 | |
| 1256 | while.body.lr.ph: ; preds = %if.then |
| 1257 | %sub = add nsw i32 %conv, -1 |
| 1258 | %arrayidx = getelementptr inbounds half, half* %0, i32 %sub |
| 1259 | %incdec.ptr = getelementptr inbounds half, half* %1, i32 1 |
| 1260 | %incdec.ptr7 = getelementptr inbounds half, half* %1, i32 2 |
| 1261 | %incdec.ptr8 = getelementptr inbounds half, half* %1, i32 3 |
| 1262 | %incdec.ptr9 = getelementptr inbounds half, half* %1, i32 4 |
| 1263 | %incdec.ptr10 = getelementptr inbounds half, half* %1, i32 5 |
| 1264 | %incdec.ptr11 = getelementptr inbounds half, half* %1, i32 6 |
| 1265 | %incdec.ptr12 = getelementptr inbounds half, half* %1, i32 7 |
| 1266 | %sub37 = add nsw i32 %conv, -8 |
| 1267 | %div = sdiv i32 %sub37, 8 |
| 1268 | %pCoeffsCur.0199 = getelementptr inbounds half, half* %1, i32 8 |
| 1269 | %cmp38201 = icmp ugt i16 %2, 15 |
| 1270 | %and = and i32 %sub37, 7 |
| 1271 | %cmp74210 = icmp eq i32 %and, 0 |
| 1272 | %idx.neg = sub nsw i32 0, %conv |
| 1273 | %3 = icmp sgt i32 %div, 1 |
| 1274 | %smax = select i1 %3, i32 %div, i32 1 |
| 1275 | br label %while.body |
| 1276 | |
| 1277 | while.body: ; preds = %while.body.lr.ph, %while.end |
| 1278 | %blkCnt.0222 = phi i32 [ %shr, %while.body.lr.ph ], [ %dec84, %while.end ] |
| 1279 | %pStateCur.0221 = phi half* [ %arrayidx, %while.body.lr.ph ], [ %add.ptr, %while.end ] |
| 1280 | %pSamples.0220 = phi half* [ %0, %while.body.lr.ph ], [ %add.ptr83, %while.end ] |
| 1281 | %pTempSrc.0219 = phi half* [ %pSrc, %while.body.lr.ph ], [ %add.ptr14, %while.end ] |
| 1282 | %pOutput.0218 = phi half* [ %pDst, %while.body.lr.ph ], [ %add.ptr81, %while.end ] |
| 1283 | %4 = load half, half* %1, align 4 |
| 1284 | %5 = load half, half* %incdec.ptr, align 4 |
| 1285 | %6 = load half, half* %incdec.ptr7, align 4 |
| 1286 | %7 = load half, half* %incdec.ptr8, align 4 |
| 1287 | %8 = load half, half* %incdec.ptr9, align 4 |
| 1288 | %9 = load half, half* %incdec.ptr10, align 4 |
| 1289 | %10 = load half, half* %incdec.ptr11, align 4 |
| 1290 | %11 = load half, half* %incdec.ptr12, align 4 |
| 1291 | %12 = bitcast half* %pTempSrc.0219 to <8 x half>* |
| 1292 | %13 = load <8 x half>, <8 x half>* %12, align 4 |
| 1293 | %14 = bitcast half* %pStateCur.0221 to <8 x half>* |
| 1294 | store <8 x half> %13, <8 x half>* %14, align 4 |
| 1295 | %add.ptr = getelementptr inbounds half, half* %pStateCur.0221, i32 4 |
| 1296 | %add.ptr14 = getelementptr inbounds half, half* %pTempSrc.0219, i32 4 |
| 1297 | %15 = bitcast half* %pSamples.0220 to <8 x half>* |
| 1298 | %16 = load <8 x half>, <8 x half>* %15, align 4 |
| 1299 | %.splatinsert = insertelement <8 x half> undef, half %4, i32 0 |
| 1300 | %.splat = shufflevector <8 x half> %.splatinsert, <8 x half> undef, <8 x i32> zeroinitializer |
| 1301 | %17 = fmul fast <8 x half> %16, %.splat |
| 1302 | %arrayidx15 = getelementptr inbounds half, half* %pSamples.0220, i32 1 |
| 1303 | %18 = bitcast half* %arrayidx15 to <8 x half>* |
| 1304 | %19 = load <8 x half>, <8 x half>* %18, align 4 |
| 1305 | %.splatinsert16 = insertelement <8 x half> undef, half %5, i32 0 |
| 1306 | %.splat17 = shufflevector <8 x half> %.splatinsert16, <8 x half> undef, <8 x i32> zeroinitializer |
| 1307 | %20 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %19, <8 x half> %.splat17, <8 x half> %17) |
| 1308 | %arrayidx18 = getelementptr inbounds half, half* %pSamples.0220, i32 2 |
| 1309 | %21 = bitcast half* %arrayidx18 to <8 x half>* |
| 1310 | %22 = load <8 x half>, <8 x half>* %21, align 4 |
| 1311 | %.splatinsert19 = insertelement <8 x half> undef, half %6, i32 0 |
| 1312 | %.splat20 = shufflevector <8 x half> %.splatinsert19, <8 x half> undef, <8 x i32> zeroinitializer |
| 1313 | %23 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %22, <8 x half> %.splat20, <8 x half> %20) |
| 1314 | %arrayidx21 = getelementptr inbounds half, half* %pSamples.0220, i32 3 |
| 1315 | %24 = bitcast half* %arrayidx21 to <8 x half>* |
| 1316 | %25 = load <8 x half>, <8 x half>* %24, align 4 |
| 1317 | %.splatinsert22 = insertelement <8 x half> undef, half %7, i32 0 |
| 1318 | %.splat23 = shufflevector <8 x half> %.splatinsert22, <8 x half> undef, <8 x i32> zeroinitializer |
| 1319 | %26 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %25, <8 x half> %.splat23, <8 x half> %23) |
| 1320 | %arrayidx24 = getelementptr inbounds half, half* %pSamples.0220, i32 4 |
| 1321 | %27 = bitcast half* %arrayidx24 to <8 x half>* |
| 1322 | %28 = load <8 x half>, <8 x half>* %27, align 4 |
| 1323 | %.splatinsert25 = insertelement <8 x half> undef, half %8, i32 0 |
| 1324 | %.splat26 = shufflevector <8 x half> %.splatinsert25, <8 x half> undef, <8 x i32> zeroinitializer |
| 1325 | %29 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %28, <8 x half> %.splat26, <8 x half> %26) |
| 1326 | %arrayidx27 = getelementptr inbounds half, half* %pSamples.0220, i32 5 |
| 1327 | %30 = bitcast half* %arrayidx27 to <8 x half>* |
| 1328 | %31 = load <8 x half>, <8 x half>* %30, align 4 |
| 1329 | %.splatinsert28 = insertelement <8 x half> undef, half %9, i32 0 |
| 1330 | %.splat29 = shufflevector <8 x half> %.splatinsert28, <8 x half> undef, <8 x i32> zeroinitializer |
| 1331 | %32 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %31, <8 x half> %.splat29, <8 x half> %29) |
| 1332 | %arrayidx30 = getelementptr inbounds half, half* %pSamples.0220, i32 6 |
| 1333 | %33 = bitcast half* %arrayidx30 to <8 x half>* |
| 1334 | %34 = load <8 x half>, <8 x half>* %33, align 4 |
| 1335 | %.splatinsert31 = insertelement <8 x half> undef, half %10, i32 0 |
| 1336 | %.splat32 = shufflevector <8 x half> %.splatinsert31, <8 x half> undef, <8 x i32> zeroinitializer |
| 1337 | %35 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %34, <8 x half> %.splat32, <8 x half> %32) |
| 1338 | %arrayidx33 = getelementptr inbounds half, half* %pSamples.0220, i32 7 |
| 1339 | %36 = bitcast half* %arrayidx33 to <8 x half>* |
| 1340 | %37 = load <8 x half>, <8 x half>* %36, align 4 |
| 1341 | %.splatinsert34 = insertelement <8 x half> undef, half %11, i32 0 |
| 1342 | %.splat35 = shufflevector <8 x half> %.splatinsert34, <8 x half> undef, <8 x i32> zeroinitializer |
| 1343 | %38 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %37, <8 x half> %.splat35, <8 x half> %35) |
| 1344 | %pSamples.1200 = getelementptr inbounds half, half* %pSamples.0220, i32 8 |
| 1345 | br i1 %cmp38201, label %for.body, label %for.end |
| 1346 | |
| 1347 | for.body: ; preds = %while.body, %for.body |
| 1348 | %pSamples.1207 = phi half* [ %pSamples.1, %for.body ], [ %pSamples.1200, %while.body ] |
| 1349 | %pCoeffsCur.0206 = phi half* [ %pCoeffsCur.0, %for.body ], [ %pCoeffsCur.0199, %while.body ] |
| 1350 | %.pn205 = phi half* [ %pCoeffsCur.0206, %for.body ], [ %1, %while.body ] |
| 1351 | %i.0204 = phi i32 [ %inc, %for.body ], [ 0, %while.body ] |
| 1352 | %vecAcc0.0203 = phi <8 x half> [ %70, %for.body ], [ %38, %while.body ] |
| 1353 | %pSamples.0.pn202 = phi half* [ %pSamples.1207, %for.body ], [ %pSamples.0220, %while.body ] |
| 1354 | %incdec.ptr40 = getelementptr inbounds half, half* %.pn205, i32 9 |
| 1355 | %39 = load half, half* %pCoeffsCur.0206, align 4 |
| 1356 | %incdec.ptr41 = getelementptr inbounds half, half* %.pn205, i32 10 |
| 1357 | %40 = load half, half* %incdec.ptr40, align 4 |
| 1358 | %incdec.ptr42 = getelementptr inbounds half, half* %.pn205, i32 11 |
| 1359 | %41 = load half, half* %incdec.ptr41, align 4 |
| 1360 | %incdec.ptr43 = getelementptr inbounds half, half* %.pn205, i32 12 |
| 1361 | %42 = load half, half* %incdec.ptr42, align 4 |
| 1362 | %incdec.ptr44 = getelementptr inbounds half, half* %.pn205, i32 13 |
| 1363 | %43 = load half, half* %incdec.ptr43, align 4 |
| 1364 | %incdec.ptr45 = getelementptr inbounds half, half* %.pn205, i32 14 |
| 1365 | %44 = load half, half* %incdec.ptr44, align 4 |
| 1366 | %incdec.ptr46 = getelementptr inbounds half, half* %.pn205, i32 15 |
| 1367 | %45 = load half, half* %incdec.ptr45, align 4 |
| 1368 | %46 = load half, half* %incdec.ptr46, align 4 |
| 1369 | %47 = bitcast half* %pSamples.1207 to <8 x half>* |
| 1370 | %48 = load <8 x half>, <8 x half>* %47, align 4 |
| 1371 | %.splatinsert48 = insertelement <8 x half> undef, half %39, i32 0 |
| 1372 | %.splat49 = shufflevector <8 x half> %.splatinsert48, <8 x half> undef, <8 x i32> zeroinitializer |
| 1373 | %49 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %48, <8 x half> %.splat49, <8 x half> %vecAcc0.0203) |
| 1374 | %arrayidx50 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 9 |
| 1375 | %50 = bitcast half* %arrayidx50 to <8 x half>* |
| 1376 | %51 = load <8 x half>, <8 x half>* %50, align 4 |
| 1377 | %.splatinsert51 = insertelement <8 x half> undef, half %40, i32 0 |
| 1378 | %.splat52 = shufflevector <8 x half> %.splatinsert51, <8 x half> undef, <8 x i32> zeroinitializer |
| 1379 | %52 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %51, <8 x half> %.splat52, <8 x half> %49) |
| 1380 | %arrayidx53 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 10 |
| 1381 | %53 = bitcast half* %arrayidx53 to <8 x half>* |
| 1382 | %54 = load <8 x half>, <8 x half>* %53, align 4 |
| 1383 | %.splatinsert54 = insertelement <8 x half> undef, half %41, i32 0 |
| 1384 | %.splat55 = shufflevector <8 x half> %.splatinsert54, <8 x half> undef, <8 x i32> zeroinitializer |
| 1385 | %55 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %54, <8 x half> %.splat55, <8 x half> %52) |
| 1386 | %arrayidx56 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 11 |
| 1387 | %56 = bitcast half* %arrayidx56 to <8 x half>* |
| 1388 | %57 = load <8 x half>, <8 x half>* %56, align 4 |
| 1389 | %.splatinsert57 = insertelement <8 x half> undef, half %42, i32 0 |
| 1390 | %.splat58 = shufflevector <8 x half> %.splatinsert57, <8 x half> undef, <8 x i32> zeroinitializer |
| 1391 | %58 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %57, <8 x half> %.splat58, <8 x half> %55) |
| 1392 | %arrayidx59 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 12 |
| 1393 | %59 = bitcast half* %arrayidx59 to <8 x half>* |
| 1394 | %60 = load <8 x half>, <8 x half>* %59, align 4 |
| 1395 | %.splatinsert60 = insertelement <8 x half> undef, half %43, i32 0 |
| 1396 | %.splat61 = shufflevector <8 x half> %.splatinsert60, <8 x half> undef, <8 x i32> zeroinitializer |
| 1397 | %61 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %60, <8 x half> %.splat61, <8 x half> %58) |
| 1398 | %arrayidx62 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 13 |
| 1399 | %62 = bitcast half* %arrayidx62 to <8 x half>* |
| 1400 | %63 = load <8 x half>, <8 x half>* %62, align 4 |
| 1401 | %.splatinsert63 = insertelement <8 x half> undef, half %44, i32 0 |
| 1402 | %.splat64 = shufflevector <8 x half> %.splatinsert63, <8 x half> undef, <8 x i32> zeroinitializer |
| 1403 | %64 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %63, <8 x half> %.splat64, <8 x half> %61) |
| 1404 | %arrayidx65 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 14 |
| 1405 | %65 = bitcast half* %arrayidx65 to <8 x half>* |
| 1406 | %66 = load <8 x half>, <8 x half>* %65, align 4 |
| 1407 | %.splatinsert66 = insertelement <8 x half> undef, half %45, i32 0 |
| 1408 | %.splat67 = shufflevector <8 x half> %.splatinsert66, <8 x half> undef, <8 x i32> zeroinitializer |
| 1409 | %67 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %66, <8 x half> %.splat67, <8 x half> %64) |
| 1410 | %arrayidx68 = getelementptr inbounds half, half* %pSamples.0.pn202, i32 15 |
| 1411 | %68 = bitcast half* %arrayidx68 to <8 x half>* |
| 1412 | %69 = load <8 x half>, <8 x half>* %68, align 4 |
| 1413 | %.splatinsert69 = insertelement <8 x half> undef, half %46, i32 0 |
| 1414 | %.splat70 = shufflevector <8 x half> %.splatinsert69, <8 x half> undef, <8 x i32> zeroinitializer |
| 1415 | %70 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %69, <8 x half> %.splat70, <8 x half> %67) |
| 1416 | %inc = add nuw nsw i32 %i.0204, 1 |
| 1417 | %pCoeffsCur.0 = getelementptr inbounds half, half* %pCoeffsCur.0206, i32 8 |
| 1418 | %pSamples.1 = getelementptr inbounds half, half* %pSamples.1207, i32 8 |
| 1419 | %exitcond = icmp eq i32 %inc, %smax |
| 1420 | br i1 %exitcond, label %for.end, label %for.body |
| 1421 | |
| 1422 | for.end: ; preds = %for.body, %while.body |
| 1423 | %vecAcc0.0.lcssa = phi <8 x half> [ %38, %while.body ], [ %70, %for.body ] |
| 1424 | %pCoeffsCur.0.lcssa = phi half* [ %pCoeffsCur.0199, %while.body ], [ %pCoeffsCur.0, %for.body ] |
| 1425 | %pSamples.1.lcssa = phi half* [ %pSamples.1200, %while.body ], [ %pSamples.1, %for.body ] |
| 1426 | br i1 %cmp74210, label %while.end, label %while.body76 |
| 1427 | |
| 1428 | while.body76: ; preds = %for.end, %while.body76 |
| 1429 | %pCoeffsCur.1214 = phi half* [ %incdec.ptr77, %while.body76 ], [ %pCoeffsCur.0.lcssa, %for.end ] |
| 1430 | %vecAcc0.1213 = phi <8 x half> [ %74, %while.body76 ], [ %vecAcc0.0.lcssa, %for.end ] |
| 1431 | %numCnt.0212 = phi i32 [ %dec, %while.body76 ], [ %and, %for.end ] |
| 1432 | %pSamples.2211 = phi half* [ %incdec.ptr80, %while.body76 ], [ %pSamples.1.lcssa, %for.end ] |
| 1433 | %incdec.ptr77 = getelementptr inbounds half, half* %pCoeffsCur.1214, i32 1 |
| 1434 | %71 = load half, half* %pCoeffsCur.1214, align 4 |
| 1435 | %72 = bitcast half* %pSamples.2211 to <8 x half>* |
| 1436 | %73 = load <8 x half>, <8 x half>* %72, align 4 |
| 1437 | %.splatinsert78 = insertelement <8 x half> undef, half %71, i32 0 |
| 1438 | %.splat79 = shufflevector <8 x half> %.splatinsert78, <8 x half> undef, <8 x i32> zeroinitializer |
| 1439 | %74 = tail call fast <8 x half> @llvm.fma.v8f16(<8 x half> %73, <8 x half> %.splat79, <8 x half> %vecAcc0.1213) |
| 1440 | %incdec.ptr80 = getelementptr inbounds half, half* %pSamples.2211, i32 1 |
| 1441 | %dec = add nsw i32 %numCnt.0212, -1 |
| 1442 | %cmp74 = icmp sgt i32 %numCnt.0212, 1 |
| 1443 | br i1 %cmp74, label %while.body76, label %while.end.loopexit |
| 1444 | |
| 1445 | while.end.loopexit: ; preds = %while.body76 |
| 1446 | %scevgep = getelementptr half, half* %pSamples.1.lcssa, i32 %and |
| 1447 | br label %while.end |
| 1448 | |
| 1449 | while.end: ; preds = %while.end.loopexit, %for.end |
| 1450 | %pSamples.2.lcssa = phi half* [ %pSamples.1.lcssa, %for.end ], [ %scevgep, %while.end.loopexit ] |
| 1451 | %vecAcc0.1.lcssa = phi <8 x half> [ %vecAcc0.0.lcssa, %for.end ], [ %74, %while.end.loopexit ] |
| 1452 | %75 = bitcast half* %pOutput.0218 to <8 x half>* |
| 1453 | store <8 x half> %vecAcc0.1.lcssa, <8 x half>* %75, align 4 |
| 1454 | %add.ptr81 = getelementptr inbounds half, half* %pOutput.0218, i32 4 |
| 1455 | %add.ptr82 = getelementptr inbounds half, half* %pSamples.2.lcssa, i32 4 |
| 1456 | %add.ptr83 = getelementptr inbounds half, half* %add.ptr82, i32 %idx.neg |
| 1457 | %dec84 = add nsw i32 %blkCnt.0222, -1 |
| 1458 | %cmp5 = icmp eq i32 %dec84, 0 |
| 1459 | br i1 %cmp5, label %if.end, label %while.body |
| 1460 | |
| 1461 | if.end: ; preds = %while.end, %if.then, %entry |
| 1462 | ret void |
| 1463 | } |
| 1464 | |
| 1465 | declare void @llvm.assume(i1) |
| 1466 | declare <8 x i1> @llvm.arm.mve.vctp16(i32) |
| 1467 | declare <8 x half> @llvm.fma.v8f16(<8 x half>, <8 x half>, <8 x half>) |
| 1468 | declare void @llvm.masked.store.v8f16.p0v8f16(<8 x half>, <8 x half>*, i32 immarg, <8 x i1>) |