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