From: sgokhale Date: Tue, 7 Mar 2023 11:12:21 +0000 (+0530) Subject: [LV][AArch64] Resolve test failure due use of unordered container X-Git-Tag: upstream/17.0.6~15653 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f018e54c45e309bc9cb21bc839f01f4c2ea2a8c;p=platform%2Fupstream%2Fllvm.git [LV][AArch64] Resolve test failure due use of unordered container AArch64/reg-usage.ll has an issue with the output ordering due to use of unordered container. This was discovered by -DLLVM_REVERSE_ITERATION:BOOL=ON cmake option. This patch tries to address it by making use of ordered container. Differential Revision: https://reviews.llvm.org/D145472/ --- diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 7fadb5d..0149ff3 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -6072,7 +6072,7 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef VFs) { // Saves the list of values that are used in the loop but are defined outside // the loop (not including non-instruction values such as arguments and // constants). - SmallPtrSet LoopInvariants; + SmallSetVector LoopInvariants; for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO())) { for (Instruction &I : BB->instructionsWithoutDebug()) {