[llvm-branch-commits] [llvm-branch] r353166 - Merging r353082:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Feb 5 04:51:49 PST 2019
Author: hans
Date: Tue Feb 5 04:51:49 2019
New Revision: 353166
URL: http://llvm.org/viewvc/llvm-project?rev=353166&view=rev
Log:
Merging r353082:
------------------------------------------------------------------------
r353082 | meinersbur | 2019-02-04 20:55:59 +0100 (Mon, 04 Feb 2019) | 10 lines
[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
------------------------------------------------------------------------
Added:
llvm/branches/release_80/test/Transforms/LoopTransformWarning/enable_and_isvectorized.ll
- copied unchanged from r353082, llvm/trunk/test/Transforms/LoopTransformWarning/enable_and_isvectorized.ll
Modified:
llvm/branches/release_80/ (props changed)
llvm/branches/release_80/lib/Transforms/Utils/LoopUtils.cpp
Propchange: llvm/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 5 04:51:49 2019
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,351325,351344-351345,351349,351351,351370,351381,351421,351426,351436,351475,351485,351753-351754,351910,351930,351932,352034,352204,352246,352374,352770,352889,352945
+/llvm/trunk:155241,351325,351344-351345,351349,351351,351370,351381,351421,351426,351436,351475,351485,351753-351754,351910,351930,351932,352034,352204,352246,352374,352770,352889,352945,353082
Modified: llvm/branches/release_80/lib/Transforms/Utils/LoopUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_80/lib/Transforms/Utils/LoopUtils.cpp?rev=353166&r1=353165&r2=353166&view=diff
==============================================================================
--- llvm/branches/release_80/lib/Transforms/Utils/LoopUtils.cpp (original)
+++ llvm/branches/release_80/lib/Transforms/Utils/LoopUtils.cpp Tue Feb 5 04:51:49 2019
@@ -376,17 +376,17 @@ TransformationMode llvm::hasVectorizeTra
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;
More information about the llvm-branch-commits
mailing list