Skip to content

Commit 5386786

Browse files
committed
Address more review
1 parent e8c62ee commit 5386786

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ Value *VPInstruction::generate(VPTransformState &State) {
531531
// Count the number of bits set in each lane and reduce the result to a scalar
532532
case VPInstruction::PopCount: {
533533
Value *Op = State.get(getOperand(0));
534-
auto *VT = Op->getType();
534+
Type *VT = Op->getType();
535535
Value *Cnt = Op;
536536

537537
// i1 vectors can just use the add reduction. Bigger elements need a ctpop
@@ -3647,7 +3647,7 @@ void VPAliasLaneMaskRecipe::print(raw_ostream &O, const Twine &Indent,
36473647
VPSlotTracker &SlotTracker) const {
36483648
O << Indent << "EMIT ";
36493649
getVPSingleValue()->printAsOperand(O, SlotTracker);
3650-
O << " = alias lane mask ";
3650+
O << " = ALIAS-LANE-MASK ";
36513651
getSourceValue()->printAsOperand(O, SlotTracker);
36523652
O << ", ";
36533653
getSinkValue()->printAsOperand(O, SlotTracker);

llvm/test/Transforms/LoopVectorize/vplan-printing.ll

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,35 @@ exit:
10581058
ret void
10591059
}
10601060

1061+
define dso_local void @alias_mask(ptr noalias %a, ptr %b, ptr %c, i32 %n) {
1062+
entry:
1063+
%cmp11 = icmp sgt i32 %n, 0
1064+
br i1 %cmp11, label %for.body.preheader, label %for.cond.cleanup
1065+
1066+
for.body.preheader: ; preds = %entry
1067+
%wide.trip.count = zext nneg i32 %n to i64
1068+
br label %for.body
1069+
1070+
for.cond.cleanup.loopexit: ; preds = %for.body
1071+
br label %for.cond.cleanup
1072+
1073+
for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
1074+
ret void
1075+
1076+
for.body: ; preds = %for.body.preheader, %for.body
1077+
%indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
1078+
%arrayidx = getelementptr inbounds i8, ptr %a, i64 %indvars.iv
1079+
%0 = load i8, ptr %arrayidx, align 1
1080+
%arrayidx2 = getelementptr inbounds i8, ptr %b, i64 %indvars.iv
1081+
%1 = load i8, ptr %arrayidx2, align 1
1082+
%add = add i8 %1, %0
1083+
%arrayidx6 = getelementptr inbounds i8, ptr %c, i64 %indvars.iv
1084+
store i8 %add, ptr %arrayidx6, align 1
1085+
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
1086+
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
1087+
br i1 %exitcond.not, label %for.cond.cleanup.loopexit, label %for.body
1088+
}
1089+
10611090
!llvm.dbg.cu = !{!0}
10621091
!llvm.module.flags = !{!3, !4}
10631092

0 commit comments

Comments
 (0)