|
1 |
| -; RUN: opt < %s -passes=loop-vectorize -force-vector-width=4 -S 2>&1 | FileCheck %s |
2 |
| -; RUN: opt < %s -passes=debugify,loop-vectorize -force-vector-width=4 -S | FileCheck %s -check-prefix DEBUGLOC |
3 |
| -; RUN: opt < %s -passes=debugify,loop-vectorize -force-vector-width=4 -S --try-experimental-debuginfo-iterators | FileCheck %s -check-prefix DEBUGLOC |
| 1 | +; RUN: opt < %s -passes=loop-vectorize -S 2>&1 | FileCheck %s |
| 2 | +; RUN: opt < %s -passes=debugify,loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S | FileCheck %s -check-prefix DEBUGLOC |
| 3 | +; RUN: opt < %s -passes=debugify,loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S --try-experimental-debuginfo-iterators | FileCheck %s -check-prefix DEBUGLOC |
4 | 4 | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
5 | 5 |
|
6 | 6 | ; This test makes sure we don't duplicate the loop vectorizer's metadata
|
|
54 | 54 | ret void
|
55 | 55 | }
|
56 | 56 |
|
| 57 | +define void @widen_intrinsic_dbg(i64 %n, ptr noalias %y, ptr noalias %x) nounwind uwtable { |
| 58 | +; DEBUGLOC-LABEL: define void @widen_intrinsic_dbg( |
| 59 | +; |
| 60 | +; DEBUGLOC: vector.body: |
| 61 | +; DEBUGLOC: = call <4 x float> @llvm.sqrt.v4f32(<4 x float> %{{.+}}), !dbg ![[INTRINSIC_LOC:[0-9]+]] |
| 62 | +; DEBUGLOC: for.body: |
| 63 | +; DEBUGLOC: %call = tail call float @llvm.sqrt.f32(float %lv) #2, !dbg ![[INTRINSIC_LOC]] |
| 64 | +; |
| 65 | +entry: |
| 66 | + %cmp6 = icmp sgt i64 %n, 0 |
| 67 | + br i1 %cmp6, label %for.body, label %for.end |
| 68 | + |
| 69 | +for.body: |
| 70 | + %iv = phi i64 [ %iv.next, %for.body ], [ 0, %entry ] |
| 71 | + %arrayidx = getelementptr inbounds float, ptr %y, i64 %iv |
| 72 | + %lv = load float, ptr %arrayidx, align 4 |
| 73 | + %call = tail call float @llvm.sqrt.f32(float %lv) nounwind readnone |
| 74 | + %arrayidx2 = getelementptr inbounds float, ptr %x, i64 %iv |
| 75 | + store float %call, ptr %arrayidx2, align 4 |
| 76 | + %iv.next = add i64 %iv, 1 |
| 77 | + %exitcond = icmp eq i64 %iv.next, %n |
| 78 | + br i1 %exitcond, label %for.end, label %for.body |
| 79 | + |
| 80 | +for.end: |
| 81 | + ret void |
| 82 | +} |
57 | 83 |
|
58 | 84 | !0 = !{!0, !1}
|
59 | 85 | !1 = !{!"llvm.loop.vectorize.width", i32 4}
|
|
62 | 88 |
|
63 | 89 | ; DEBUGLOC: ![[RESUMELOC]] = !DILocation(line: 2
|
64 | 90 | ; DEBUGLOC: ![[PTRIVLOC]] = !DILocation(line: 12
|
| 91 | +; DEBUGLOC: ![[INTRINSIC_LOC]] = !DILocation(line: 23 |
0 commit comments