Skip to content

Commit 5a1299b

Browse files
committed
[VPlan] Strip stray whitespace when printing VPWidenSelectRecipe. (NFCI)
printFlags takes care of inserting the correct amount of spaces, depending on whether there are flags to print or not.
1 parent d34c717 commit 5a1299b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ void VPWidenSelectRecipe::printRecipe(raw_ostream &O, const Twine &Indent,
19081908
VPSlotTracker &SlotTracker) const {
19091909
O << Indent << "WIDEN-SELECT ";
19101910
printAsOperand(O, SlotTracker);
1911-
O << " = select ";
1911+
O << " = select";
19121912
printFlags(O);
19131913
getOperand(0)->printAsOperand(O, SlotTracker);
19141914
O << ", ";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ define void @print_widen_gep_and_select(i64 %n, ptr noalias %y, ptr noalias %x,
9797
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer inbounds ir<%arrayidx>
9898
; CHECK-NEXT: WIDEN ir<%lv> = load vp<[[VEC_PTR]]>
9999
; CHECK-NEXT: WIDEN ir<%cmp> = icmp eq ir<%arrayidx>, ir<%z>
100-
; CHECK-NEXT: WIDEN-SELECT ir<%sel> = select ir<%cmp>, ir<1.000000e+01>, ir<2.000000e+01>
100+
; CHECK-NEXT: WIDEN-SELECT ir<%sel> = select ir<%cmp>, ir<1.000000e+01>, ir<2.000000e+01>
101101
; CHECK-NEXT: WIDEN ir<%add> = fadd ir<%lv>, ir<%sel>
102102
; CHECK-NEXT: CLONE ir<%arrayidx2> = getelementptr inbounds ir<%x>, vp<[[STEPS]]>
103103
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer inbounds ir<%arrayidx2>
@@ -1029,7 +1029,7 @@ define void @print_select_with_fastmath_flags(ptr noalias %a, ptr noalias %b, pt
10291029
; CHECK-NEXT: WIDEN ir<[[LD2:%.+]]> = load vp<[[PTR2]]>
10301030
; CHECK-NEXT: WIDEN ir<[[FCMP:%.+]]> = fcmp ogt fast ir<[[LD1]]>, ir<[[LD2]]>
10311031
; CHECK-NEXT: WIDEN ir<[[FADD:%.+]]> = fadd fast ir<[[LD1]]>, ir<1.000000e+01>
1032-
; CHECK-NEXT: WIDEN-SELECT ir<[[SELECT:%.+]]> = select fast ir<[[FCMP]]>, ir<[[FADD]]>, ir<[[LD2]]>
1032+
; CHECK-NEXT: WIDEN-SELECT ir<[[SELECT:%.+]]> = select fast ir<[[FCMP]]>, ir<[[FADD]]>, ir<[[LD2]]>
10331033
; CHECK-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds nuw ir<%a>, vp<[[ST]]>
10341034
; CHECK-NEXT: vp<[[PTR3:%.+]]> = vector-pointer inbounds nuw ir<[[GEP3]]>
10351035
; CHECK-NEXT: WIDEN store vp<[[PTR3]]>, ir<[[SELECT]]>

0 commit comments

Comments
 (0)