From fc3cc8a4b074d42f5352824ccd53de2e592a7af7 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Sun, 29 Mar 2020 13:58:04 -0400 Subject: [PATCH] [VectorCombine] skip debug intrinsics first for efficiency --- llvm/lib/Transforms/Vectorize/VectorCombine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp index ba3ff87..70ee8cc 100644 --- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp +++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp @@ -261,8 +261,11 @@ static bool runImpl(Function &F, const TargetTransformInfo &TTI, // use->defs, so we're more likely to succeed by starting from the bottom. // TODO: It could be more efficient to remove dead instructions // iteratively in this loop rather than waiting until the end. - for (Instruction &I : make_range(BB.rbegin(), BB.rend())) + for (Instruction &I : make_range(BB.rbegin(), BB.rend())) { + if (isa(I)) + continue; MadeChange |= foldExtractExtract(I, TTI); + } } // We're done with transforms, so remove dead instructions. -- 2.7.4