diff options
author | Silviu Baranga <silviu.baranga@arm.com> | 2016-02-08 17:02:45 +0000 |
---|---|---|
committer | Silviu Baranga <silviu.baranga@arm.com> | 2016-02-08 17:02:45 +0000 |
commit | ea63a7f512dc25451b9da06653d966397fa9b758 (patch) | |
tree | 9bf5c93fa4489e9a59bc762c706de0320affbeec /llvm/test/Transforms/LoopVectorize/same-base-access.ll | |
parent | cbec16036b1e03c5e5ba7ab9fde7a0543286c1c9 (diff) | |
download | bcm5719-llvm-ea63a7f512dc25451b9da06653d966397fa9b758.tar.gz bcm5719-llvm-ea63a7f512dc25451b9da06653d966397fa9b758.zip |
[SCEV][LAA] Re-commit r260085 and r260086, this time with a fix for the memory
sanitizer issue. The PredicatedScalarEvolution's copy constructor
wasn't copying the Generation value, and was leaving it un-initialized.
Original commit message:
[SCEV][LAA] Add no wrap SCEV predicates and use use them to improve strided pointer detection
Summary:
This change adds no wrap SCEV predicates with:
- support for runtime checking
- support for expression rewriting:
(sext ({x,+,y}) -> {sext(x),+,sext(y)}
(zext ({x,+,y}) -> {zext(x),+,sext(y)}
Note that we are sign extending the increment of the SCEV, even for
the zext case. This is needed to cover the fairly common case where y would
be a (small) negative integer. In order to do this, this change adds two new
flags: nusw and nssw that are applicable to AddRecExprs and permit the
transformations above.
We also change isStridedPtr in LAA to be able to make use of
these predicates. With this feature we should now always be able to
work around overflow issues in the dependence analysis.
Reviewers: mzolotukhin, sanjoy, anemet
Subscribers: mzolotukhin, sanjoy, llvm-commits, rengolin, jmolloy, hfinkel
Differential Revision: http://reviews.llvm.org/D15412
llvm-svn: 260112
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/same-base-access.ll')
-rw-r--r-- | llvm/test/Transforms/LoopVectorize/same-base-access.ll | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/test/Transforms/LoopVectorize/same-base-access.ll b/llvm/test/Transforms/LoopVectorize/same-base-access.ll index 31cff0ee653..53fad8afdad 100644 --- a/llvm/test/Transforms/LoopVectorize/same-base-access.ll +++ b/llvm/test/Transforms/LoopVectorize/same-base-access.ll @@ -62,11 +62,9 @@ define i32 @kernel11(double* %x, double* %y, i32 %n) nounwind uwtable ssp { } - -; We don't vectorize this function because A[i*7] is scalarized, and the -; different scalars can in theory wrap around and overwrite other scalar -; elements. At the moment we only allow read/write access to arrays -; that are consecutive. +; A[i*7] is scalarized, and the different scalars can in theory wrap +; around and overwrite other scalar elements. However we can still +; vectorize because we can version the loop to avoid this case. ; ; void foo(int *a) { ; for (int i=0; i<256; ++i) { @@ -78,7 +76,7 @@ define i32 @kernel11(double* %x, double* %y, i32 %n) nounwind uwtable ssp { ; } ; CHECK-LABEL: @func2( -; CHECK-NOT: <4 x i32> +; CHECK: <4 x i32> ; CHECK: ret define i32 @func2(i32* nocapture %a) nounwind uwtable ssp { br label %1 |