Skip to content

Commit

Permalink
[VPlan] Print result value for loads in VPWidenMemoryInst (NFC).
Browse files Browse the repository at this point in the history
For loads, print the result value.
  • Loading branch information
fhahn committed Nov 9, 2020
1 parent 537829f commit f0d7627
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions llvm/lib/Transforms/Vectorize/VPlan.cpp
Expand Up @@ -928,8 +928,13 @@ void VPPredInstPHIRecipe::print(raw_ostream &O, const Twine &Indent,

void VPWidenMemoryInstructionRecipe::print(raw_ostream &O, const Twine &Indent,
VPSlotTracker &SlotTracker) const {
O << "\"WIDEN "
<< Instruction::getOpcodeName(getUnderlyingInstr()->getOpcode()) << " ";
O << "\"WIDEN ";

if (!isStore()) {
printAsOperand(O, SlotTracker);
O << " = ";
}
O << Instruction::getOpcodeName(getUnderlyingInstr()->getOpcode()) << " ";

printOperands(O, SlotTracker);
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/LoopVectorize/vplan-printing.ll
Expand Up @@ -11,7 +11,7 @@ define void @print_call_and_memory(i64 %n, float* noalias %y, float* noalias %x)
; CHECK-NEXT: "for.body:\n" +
; CHECK-NEXT: "WIDEN-INDUCTION %iv = phi %iv.next, 0\l" +
; CHECK-NEXT: "CLONE %arrayidx = getelementptr %y, %iv\l" +
; CHECK-NEXT: "WIDEN load ir<%arrayidx>\l" +
; CHECK-NEXT: "WIDEN ir<%lv> = load ir<%arrayidx>\l" +
; CHECK-NEXT: "WIDEN-CALL ir<%call> = call @llvm.sqrt.f32(ir<%lv>)\l" +
; CHECK-NEXT: "CLONE %arrayidx2 = getelementptr %x, %iv\l" +
; CHECK-NEXT: "WIDEN store ir<%arrayidx2>, ir<%call>\l"
Expand Down

0 comments on commit f0d7627

Please sign in to comment.