diff options
| author | George Burgess IV <george.burgess.iv@gmail.com> | 2018-12-24 05:55:50 +0000 |
|---|---|---|
| committer | George Burgess IV <george.burgess.iv@gmail.com> | 2018-12-24 05:55:50 +0000 |
| commit | 7e12875c899faa9284562ee7e83be06a341f513c (patch) | |
| tree | 9075ad5cbf68cb8bebcbbd3c7d71829a19340e3e /llvm/lib/Target | |
| parent | 0adc3fe9e7a73351a2e948d83621c1c9b940b4bf (diff) | |
| download | bcm5719-llvm-7e12875c899faa9284562ee7e83be06a341f513c.tar.gz bcm5719-llvm-7e12875c899faa9284562ee7e83be06a341f513c.zip | |
[LoopIdioms] More LocationSize::precise annotations; NFC
Both of these places reference memset-like loops. Memset is precise.
Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.
llvm-svn: 350044
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp b/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp index 702d68fad9b..985f41f3a7d 100644 --- a/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp +++ b/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp @@ -1975,7 +1975,8 @@ mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L, // If the loop iterates a fixed number of times, we can refine the access // size to be exactly the size of the memset, which is (BECount+1)*StoreSize if (const SCEVConstant *BECst = dyn_cast<SCEVConstant>(BECount)) - AccessSize = (BECst->getValue()->getZExtValue() + 1) * StoreSize; + AccessSize = LocationSize::precise((BECst->getValue()->getZExtValue() + 1) * + StoreSize); // TODO: For this to be really effective, we have to dive into the pointer // operand in the store. Store to &A[i] of 100 will always return may alias |

