File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -9561,13 +9561,16 @@ void VPWidenMemoryInstructionRecipe::execute(VPTransformState &State) {
9561
9561
auto &Builder = State.Builder ;
9562
9562
InnerLoopVectorizer::VectorParts BlockInMaskParts (State.UF );
9563
9563
bool isMaskRequired = getMask ();
9564
- if (isMaskRequired)
9564
+ if (isMaskRequired) {
9565
+ // Mask reversal is only neede for non-all-one (null) masks, as reverse of a
9566
+ // null all-one mask is a null mask.
9565
9567
for (unsigned Part = 0 ; Part < State.UF ; ++Part) {
9566
9568
Value *Mask = State.get (getMask (), Part);
9567
9569
if (isReverse ())
9568
9570
Mask = Builder.CreateVectorReverse (Mask, " reverse" );
9569
9571
BlockInMaskParts[Part] = Mask;
9570
9572
}
9573
+ }
9571
9574
9572
9575
const auto CreateVecPtr = [&](unsigned Part, Value *Ptr) -> Value * {
9573
9576
// Calculate the pointer for the specific unroll-part.
You can’t perform that action at this time.
0 commit comments