mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-31 12:30:06 +00:00
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
48 lines
1.6 KiB
LLVM
48 lines
1.6 KiB
LLVM
; RUN: opt < %s -loop-vectorize -S | FileCheck %s
|
|
|
|
; CHECK: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT: fadd
|
|
; CHECK-NEXT-NOT: fadd
|
|
|
|
target datalayout = "e-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64le-ibm-linux-gnu"
|
|
|
|
define void @test(double* nocapture readonly %arr, i32 signext %len) #0 {
|
|
entry:
|
|
%cmp4 = icmp sgt i32 %len, 0
|
|
br i1 %cmp4, label %for.body.lr.ph, label %for.end
|
|
|
|
for.body.lr.ph: ; preds = %entry
|
|
%0 = add i32 %len, -1
|
|
br label %for.body
|
|
|
|
for.body: ; preds = %for.body, %for.body.lr.ph
|
|
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ]
|
|
%redx.05 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add, %for.body ]
|
|
%arrayidx = getelementptr inbounds double, double* %arr, i64 %indvars.iv
|
|
%1 = load double, double* %arrayidx, align 8
|
|
%add = fadd fast double %1, %redx.05
|
|
%indvars.iv.next = add i64 %indvars.iv, 1
|
|
%lftr.wideiv = trunc i64 %indvars.iv to i32
|
|
%exitcond = icmp eq i32 %lftr.wideiv, %0
|
|
br i1 %exitcond, label %for.end.loopexit, label %for.body
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
%add.lcssa = phi double [ %add, %for.body ]
|
|
br label %for.end
|
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
|
%redx.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add.lcssa, %for.end.loopexit ]
|
|
ret void
|
|
}
|