diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5387,7 +5387,7 @@ // here is something which only demands lane 0 of the unrolled iterations; // it does not imply that all lanes produce the same value (e.g. this is not // the usual meaning of uniform) - SmallPtrSet HasUniformUse; + SmallVector HasUniformUse; // Scan the loop for instructions which are either a) known to have only // lane 0 demanded or b) are uses which demand only lane 0 of their operand. @@ -5405,7 +5405,7 @@ if (isUniformDecision(&I, VF)) { assert(isVectorizedMemAccessUse(&I, Ptr) && "consistency check"); - HasUniformUse.insert(Ptr); + HasUniformUse.push_back(Ptr); } }