[PATCH] D155874: [llvm][SLP] Exit early if inputs to comparator are equal
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 05:44:16 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8fa02db8cf82: [llvm][SLP] Exit early if inputs to comparator are equal (authored by davidberard98, committed by ABataev).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155874/new/
https://reviews.llvm.org/D155874
Files:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Index: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -4136,6 +4136,8 @@
return TE.ReorderIndices;
if (TE.State == TreeEntry::Vectorize && TE.getOpcode() == Instruction::PHI) {
auto PHICompare = [](llvm::Value *V1, llvm::Value *V2) {
+ if (V1 == V2)
+ return false;
if (!V1->hasOneUse() || !V2->hasOneUse())
return false;
auto *FirstUserOfPhi1 = cast<Instruction>(*V1->user_begin());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155874.542876.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230721/b7779abb/attachment.bin>
More information about the llvm-commits
mailing list