diff options
author | Michael Kruse <llvm@meinersbur.de> | 2019-02-04 19:55:59 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2019-02-04 19:55:59 +0000 |
commit | 70560a0a2cce07901811e1d0f298a815c9b110d0 (patch) | |
tree | 72a464dd76b7582589c1da3b6a42fbf428f85e7c /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | 22309c8701b6781b08f78deb631ae19082d61f01 (diff) | |
download | bcm5719-llvm-70560a0a2cce07901811e1d0f298a815c9b110d0.tar.gz bcm5719-llvm-70560a0a2cce07901811e1d0f298a815c9b110d0.zip |
[WarnMissedTransforms] Do not warn about already vectorized loops.
LoopVectorize adds llvm.loop.isvectorized, but leaves
llvm.loop.vectorize.enable. Do not consider such a loop for user-forced
vectorization since vectorization already happened -- by prioritizing
llvm.loop.isvectorized except for TM_SuppressedByUser.
Fixes http://llvm.org/PR40546
Differential Revision: https://reviews.llvm.org/D57542
llvm-svn: 353082
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 54cb0fc23cb..57af3d1b7e0 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -378,17 +378,17 @@ TransformationMode llvm::hasVectorizeTransformation(Loop *L) { Optional<int> InterleaveCount = getOptionalIntLoopAttribute(L, "llvm.loop.interleave.count"); - if (Enable == true) { - // 'Forcing' vector width and interleave count to one effectively disables - // this tranformation. - if (VectorizeWidth == 1 && InterleaveCount == 1) - return TM_SuppressedByUser; - return TM_ForcedByUser; - } + // 'Forcing' vector width and interleave count to one effectively disables + // this tranformation. + if (Enable == true && VectorizeWidth == 1 && InterleaveCount == 1) + return TM_SuppressedByUser; if (getBooleanLoopAttribute(L, "llvm.loop.isvectorized")) return TM_Disable; + if (Enable == true) + return TM_ForcedByUser; + if (VectorizeWidth == 1 && InterleaveCount == 1) return TM_Disable; |