[PATCH] D141646: [NFC][LoopVectorize] Move WideningDecision close to its first use.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 17:30:24 PST 2023
HsiangKai created this revision.
HsiangKai added reviewers: delena, hfinkel, reames.
Herald added subscribers: shiva0217, hiraditya.
Herald added a project: All.
HsiangKai requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141646
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4677,19 +4677,18 @@
};
auto isUniformDecision = [&](Instruction *I, ElementCount VF) {
+ if (isUniformMemOpUse(I))
+ return true;
+
InstWidening WideningDecision = getWideningDecision(I, VF);
assert(WideningDecision != CM_Unknown &&
"Widening decision should be ready at this moment");
- if (isUniformMemOpUse(I))
- return true;
-
return (WideningDecision == CM_Widen ||
WideningDecision == CM_Widen_Reverse ||
WideningDecision == CM_Interleave);
};
-
// Returns true if Ptr is the pointer operand of a memory access instruction
// I, and I is known to not require scalarization.
auto isVectorizedMemAccessUse = [&](Instruction *I, Value *Ptr) -> bool {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141646.488819.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230113/2cf61e02/attachment.bin>
More information about the llvm-commits
mailing list