Vectorizer: Add support for loop reductions.

For example:

  for (i=0; i<n; i++)
   sum += A[i] +  B[i] + i;



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem
2012-10-19 23:05:40 +00:00
parent cfc6cb0c61
commit 5dbe64e2bc
4 changed files with 518 additions and 114 deletions

View File

@ -202,9 +202,8 @@ define void @example8(i32 %x) nounwind uwtable ssp {
ret void
}
; We can't vectorize because it has a reduction variable.
;CHECK: @example9
;CHECK-NOT: <4 x i32>
;CHECK: phi <4 x i32>
;CHECK: ret i32
define i32 @example9() nounwind uwtable readonly ssp {
br label %1