• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; PR23510
2; RUN: opt < %s -basicaa -slp-vectorizer -S | FileCheck %s
3
4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5target triple = "x86_64-unknown-linux-gnu"
6
7; CHECK-LABEL: @_Z3fooPml(
8; CHECK: lshr <2 x i64>
9; CHECK: lshr <2 x i64>
10
11@total = global i64 0, align 8
12
13define void @_Z3fooPml(i64* nocapture %a, i64 %i) {
14entry:
15  %tmp = load i64, i64* %a, align 8
16  %shr = lshr i64 %tmp, 4
17  store i64 %shr, i64* %a, align 8
18  %arrayidx1 = getelementptr inbounds i64, i64* %a, i64 1
19  %tmp1 = load i64, i64* %arrayidx1, align 8
20  %shr2 = lshr i64 %tmp1, 4
21  store i64 %shr2, i64* %arrayidx1, align 8
22  %arrayidx3 = getelementptr inbounds i64, i64* %a, i64 %i
23  %tmp2 = load i64, i64* %arrayidx3, align 8
24  %tmp3 = load i64, i64* @total, align 8
25  %add = add i64 %tmp3, %tmp2
26  store i64 %add, i64* @total, align 8
27  %tmp4 = load i64, i64* %a, align 8
28  %shr5 = lshr i64 %tmp4, 4
29  store i64 %shr5, i64* %a, align 8
30  %tmp5 = load i64, i64* %arrayidx1, align 8
31  %shr7 = lshr i64 %tmp5, 4
32  store i64 %shr7, i64* %arrayidx1, align 8
33  %tmp6 = load i64, i64* %arrayidx3, align 8
34  %tmp7 = load i64, i64* @total, align 8
35  %add9 = add i64 %tmp7, %tmp6
36  store i64 %add9, i64* @total, align 8
37  ret void
38}
39