File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -4041,8 +4041,7 @@ bool VectorCombine::shrinkPhiOfShuffles(Instruction &I) {
4041
4041
// Ensure all elements of the new mask are equal. If the difference between
4042
4042
// the incoming mask elements is the same, the two must be constant offsets
4043
4043
// of one another.
4044
- if (NewMask.empty () ||
4045
- !std::equal (NewMask.begin () + 1u , NewMask.end (), NewMask.begin ()))
4044
+ if (NewMask.empty () || !all_equal (NewMask))
4046
4045
return false ;
4047
4046
4048
4047
// Create new mask using difference of the two incoming masks.
@@ -4066,8 +4065,7 @@ bool VectorCombine::shrinkPhiOfShuffles(Instruction &I) {
4066
4065
return false ;
4067
4066
4068
4067
// Create new shuffles and narrowed phi.
4069
- auto Builder = IRBuilder (&I);
4070
- Builder.SetInsertPoint (Shuf);
4068
+ auto Builder = IRBuilder (Shuf);
4071
4069
Builder.SetCurrentDebugLocation (Shuf->getDebugLoc ());
4072
4070
auto *PoisonVal = PoisonValue::get (InputVT);
4073
4071
auto *NewShuf0 = Builder.CreateShuffleVector (Op, PoisonVal, NewMask);
You can’t perform that action at this time.
0 commit comments