Skip to content

Commit eb828b6

Browse files
author
Evan Cheng
committed
Do not count kill, implicit_def instructions as printed instructions.
llvm-svn: 102453
1 parent 7d8072e commit eb828b6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ void AsmPrinter::EmitFunctionBody() {
531531
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
532532
II != IE; ++II) {
533533
// Print the assembly for the instruction.
534-
if (!II->isLabel())
534+
if (!II->isLabel() && !II->isImplicitDef() && !II->isKill()) {
535535
HasAnyRealCode = true;
536-
537-
++EmittedInsts;
538-
536+
++EmittedInsts;
537+
}
538+
539539
if (ShouldPrintDebugScopes) {
540540
if (TimePassesIsEnabled) {
541541
NamedRegionTimer T(DbgTimerName, DWARFGroupName);

llvm/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc < %s -march=x86-64 -o %t -stats -info-output-file - | \
2-
; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 10
2+
; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 9
33
; RUN: grep {leal 1(\%rsi),} %t
44

55
define fastcc zeroext i8 @fullGtU(i32 %i1, i32 %i2, i8* %ptr) nounwind optsize {

0 commit comments

Comments
 (0)