[PATCH] D155874: [llvm] Exit early if inputs to comparator are equal
David Berard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 13:00:27 PDT 2023
davidberard98 updated this revision to Diff 542643.
davidberard98 added a comment.
added more context - will see if I can get arcanist working.
testing - I will look further into adding tests
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.542643.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/2ba4b00c/attachment.bin>
More information about the llvm-commits
mailing list