summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopVectorize/reduction.ll
Commit message (Collapse)AuthorAgeFilesLines
* Remove the -licm pass from the loop vectorizer test because the loop ↵Nadav Rotem2013-01-091-1/+1
| | | | | | vectorizer does it now. llvm-svn: 171930
* Fix a typo. Remove the duplicated test.Nadav Rotem2013-01-051-25/+0
| | | | llvm-svn: 171584
* iLoopVectorize: Non commutative operators can be used as reduction variables ↵Nadav Rotem2013-01-051-2/+30
| | | | | | | | as long as the reduction chain is used in the LHS. PR14803. llvm-svn: 171583
* Force a fixed unroll count on the target independent tests.Nadav Rotem2013-01-051-1/+1
| | | | | | This should fix clang-native-arm-cortex-a9. Thanks Renato. llvm-svn: 171582
* Do not vectorize loops with subtraction reductionsPaul Redmond2013-01-041-0/+50
| | | | | | | | | Since subtraction does not commute the loop vectorizer incorrectly vectorizes reductions such as x = A[i] - x. Disabling for now. llvm-svn: 171537
* LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops ↵Benjamin Kramer2012-12-181-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of scalar operations. For example on x86 with SSE4.2 a <8 x i8> add reduction becomes movdqa %xmm0, %xmm1 movhlps %xmm1, %xmm1 ## xmm1 = xmm1[1,1] paddw %xmm0, %xmm1 pshufd $1, %xmm1, %xmm0 ## xmm0 = xmm1[1,0,0,0] paddw %xmm1, %xmm0 phaddw %xmm0, %xmm0 pextrb $0, %xmm0, %edx instead of pextrb $2, %xmm0, %esi pextrb $0, %xmm0, %edx addb %sil, %dl pextrb $4, %xmm0, %esi addb %dl, %sil pextrb $6, %xmm0, %edx addb %sil, %dl pextrb $8, %xmm0, %esi addb %dl, %sil pextrb $10, %xmm0, %edi pextrb $14, %xmm0, %edx addb %sil, %dil pextrb $12, %xmm0, %esi addb %dil, %sil addb %sil, %dl llvm-svn: 170439
* LoopVectorize: Preserve NSW, NUW and IsExact flags.Nadav Rotem2012-10-311-1/+1
| | | | llvm-svn: 167174
* LoopVectorize: Fix a bug in the initialization of reduction variables. AND ↵Nadav Rotem2012-10-301-0/+1
| | | | | | | | needs to start at all-one while XOR, and OR need to start at zero. llvm-svn: 167032
* Add support for additional reduction variables: AND, OR, XOR.Nadav Rotem2012-10-251-0/+79
| | | | | | Patch by Paul Redmond <paul.redmond@intel.com>. llvm-svn: 166649
* LoopVectorizer: Add a basic cost model which uses the VTTI interface.Nadav Rotem2012-10-241-1/+1
| | | | llvm-svn: 166620
* Add support for reduction variables that do not start at zero.Nadav Rotem2012-10-211-4/+34
| | | | | | | | | | | | This is important for nested-loop reductions such as : In the innermost loop, the induction variable does not start with zero: for (i = 0 .. n) for (j = 0 .. m) sum += ... llvm-svn: 166387
* Vectorizer: Add support for loop reductions.Nadav Rotem2012-10-191-0/+122
For example: for (i=0; i<n; i++) sum += A[i] + B[i] + i; llvm-svn: 166351
OpenPOWER on IntegriCloud