diff options
author | Eric Christopher <echristo@gmail.com> | 2019-11-18 14:41:37 -0800 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2019-11-18 14:41:37 -0800 |
commit | 6f1cc4151a5ad297b2d1d87d98e266f9729100e2 (patch) | |
tree | 04372b0109f9084038f70164d52bf0eafeed2a6c /llvm/lib/Transforms/Vectorize | |
parent | 5e0a4eddac2477a5792a11bc2beb12749b91eb55 (diff) | |
download | bcm5719-llvm-6f1cc4151a5ad297b2d1d87d98e266f9729100e2.tar.gz bcm5719-llvm-6f1cc4151a5ad297b2d1d87d98e266f9729100e2.zip |
Temporarily revert "[SLP] fix miscompile on min/max reductions with extra uses (PR43948)"
as it causes an ICE on valid. A testcase was followed up on the original thread.
This reverts commit a3e61946c5bd7bdfab15af76b292e52d6ffa27f7.
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 549d8501c78..1a7a59c47d6 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -6778,21 +6778,8 @@ public: VectorizedTree = VectReductionData.createOp(Builder, "op.extra", I); } } - - // Update users. For a min/max reduction that ends with a compare and - // select, we also have to RAUW for the compare instruction feeding the - // reduction root. That's because the original compare may have extra uses - // besides the final select of the reduction. - if (ReductionData.isMinMax() && isa<SelectInst>(VectorizedTree)) { - assert(isa<SelectInst>(ReductionRoot) && - "Expected min/max reduction to have select root instruction"); - - Value *ScalarCond = cast<SelectInst>(ReductionRoot)->getCondition(); - Value *VectorCond = cast<SelectInst>(VectorizedTree)->getCondition(); - ScalarCond->replaceAllUsesWith(VectorCond); - } + // Update users. ReductionRoot->replaceAllUsesWith(VectorizedTree); - // Mark all scalar reduction ops for deletion, they are replaced by the // vector reductions. V.eraseInstructions(IgnoreList); |