1; RUN: opt -mtriple=arm-arm-eabi -mcpu=cortex-m33 < %s -arm-parallel-dsp -S | FileCheck %s
2;
3; Reduction statement is an i64 type: we only support i32 so check that the
4; rewrite isn't triggered.
5;
6; CHECK-NOT:  call i32 @llvm.arm.smlad
7;
8define dso_local i64 @test(i64 %arg, i64* nocapture readnone %arg1, i16* nocapture readonly %arg2, i16* nocapture readonly %arg3) {
9entry:
10  %cmp24 = icmp sgt i64 %arg, 0
11  br i1 %cmp24, label %for.body.preheader, label %for.cond.cleanup
12
13for.body.preheader:
14  %.pre = load i16, i16* %arg3, align 2
15  %.pre27 = load i16, i16* %arg2, align 2
16  br label %for.body
17
18for.cond.cleanup:
19  %mac1.0.lcssa = phi i64 [ 0, %entry ], [ %add11, %for.body ]
20  ret i64 %mac1.0.lcssa
21
22for.body:
23  %mac1.026 = phi i64 [ %add11, %for.body ], [ 0, %for.body.preheader ]
24  %i.025 = phi i64 [ %add, %for.body ], [ 0, %for.body.preheader ]
25  %arrayidx = getelementptr inbounds i16, i16* %arg3, i64 %i.025
26  %0 = load i16, i16* %arrayidx, align 2
27  %add = add nuw nsw i64 %i.025, 1
28  %arrayidx1 = getelementptr inbounds i16, i16* %arg3, i64 %add
29  %1 = load i16, i16* %arrayidx1, align 2
30  %arrayidx3 = getelementptr inbounds i16, i16* %arg2, i64 %i.025
31  %2 = load i16, i16* %arrayidx3, align 2
32  %conv = sext i16 %2 to i64
33  %conv4 = sext i16 %0 to i64
34  %mul = mul nsw i64 %conv, %conv4
35  %arrayidx6 = getelementptr inbounds i16, i16* %arg2, i64 %add
36  %3 = load i16, i16* %arrayidx6, align 2
37  %conv7 = sext i16 %3 to i64
38  %conv8 = sext i16 %1 to i64
39  %mul9 = mul nsw i64 %conv7, %conv8
40  %add10 = add i64 %mul, %mac1.026
41
42  %add11 = add i64 %mul9, %add10
43
44  %exitcond = icmp ne i64 %add, %arg
45  br i1 %exitcond, label %for.body, label %for.cond.cleanup
46}
47
48