[llvm-branch-commits] [llvm-branch] r195817 - Merging r195773:
Bill Wendling
isanbard at gmail.com
Tue Nov 26 21:34:53 PST 2013
Author: void
Date: Tue Nov 26 23:34:53 2013
New Revision: 195817
URL: http://llvm.org/viewvc/llvm-project?rev=195817&view=rev
Log:
Merging r195773:
------------------------------------------------------------------------
r195773 | nadav | 2013-11-26 09:29:19 -0800 (Tue, 26 Nov 2013) | 6 lines
PR18060 - When we RAUW values with ExtractElement instructions in some cases
we generate PHI nodes with multiple entries from the same basic block but
with different values. Enabling CSE on ExtractElement instructions make sure
that all of the RAUWed instructions are the same.
------------------------------------------------------------------------
Added:
llvm/branches/release_34/test/Transforms/SLPVectorizer/X86/pr18060.ll
- copied unchanged from r195773, llvm/trunk/test/Transforms/SLPVectorizer/X86/pr18060.ll
Modified:
llvm/branches/release_34/ (props changed)
llvm/branches/release_34/lib/Transforms/Vectorize/SLPVectorizer.cpp
Propchange: llvm/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 26 23:34:53 2013
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,195092-195094,195100,195102-195103,195118,195129,195136,195138,195152,195156-195157,195161-195162,195193,195272,195317-195318,195327,195330,195333,195339,195343,195355,195364,195379,195397-195399,195408,195421,195423-195424,195432,195439,195444,195455-195456,195469,195476-195477,195479,195491-195493,195514,195528,195547,195567,195591,195599,195632,195635-195636,195670,195679,195682,195684,195713,195716,195769
+/llvm/trunk:155241,195092-195094,195100,195102-195103,195118,195129,195136,195138,195152,195156-195157,195161-195162,195193,195272,195317-195318,195327,195330,195333,195339,195343,195355,195364,195379,195397-195399,195408,195421,195423-195424,195432,195439,195444,195455-195456,195469,195476-195477,195479,195491-195493,195514,195528,195547,195567,195591,195599,195632,195635-195636,195670,195679,195682,195684,195713,195716,195769,195773
Modified: llvm/branches/release_34/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=195817&r1=195816&r2=195817&view=diff
==============================================================================
--- llvm/branches/release_34/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/branches/release_34/lib/Transforms/Vectorize/SLPVectorizer.cpp Tue Nov 26 23:34:53 2013
@@ -1588,6 +1588,8 @@ Value *BoUpSLP::vectorizeTree() {
if (PHINode *PN = dyn_cast<PHINode>(Vec)) {
Builder.SetInsertPoint(PN->getParent()->getFirstInsertionPt());
Value *Ex = Builder.CreateExtractElement(Vec, Lane);
+ if (Instruction *Ins = dyn_cast<Instruction>(Ex))
+ GatherSeq.insert(Ins);
User->replaceUsesOfWith(Scalar, Ex);
} else if (isa<Instruction>(Vec)){
if (PHINode *PH = dyn_cast<PHINode>(User)) {
@@ -1595,17 +1597,23 @@ Value *BoUpSLP::vectorizeTree() {
if (PH->getIncomingValue(i) == Scalar) {
Builder.SetInsertPoint(PH->getIncomingBlock(i)->getTerminator());
Value *Ex = Builder.CreateExtractElement(Vec, Lane);
+ if (Instruction *Ins = dyn_cast<Instruction>(Ex))
+ GatherSeq.insert(Ins);
PH->setOperand(i, Ex);
}
}
} else {
Builder.SetInsertPoint(cast<Instruction>(User));
Value *Ex = Builder.CreateExtractElement(Vec, Lane);
+ if (Instruction *Ins = dyn_cast<Instruction>(Ex))
+ GatherSeq.insert(Ins);
User->replaceUsesOfWith(Scalar, Ex);
}
} else {
Builder.SetInsertPoint(F->getEntryBlock().begin());
Value *Ex = Builder.CreateExtractElement(Vec, Lane);
+ if (Instruction *Ins = dyn_cast<Instruction>(Ex))
+ GatherSeq.insert(Ins);
User->replaceUsesOfWith(Scalar, Ex);
}
More information about the llvm-branch-commits
mailing list