diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-04-27 19:38:45 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-27 19:38:45 +0000 |
commit | ed33b13a10258fe1589bf6a76d6d65ec33823076 (patch) | |
tree | d8cdd69be14e5e259df176134a0d5b4baa45a823 | |
parent | 4c4d0c0cc582a61d9e7f58594c71540aaa56b280 (diff) | |
download | external_llvm-ed33b13a10258fe1589bf6a76d6d65ec33823076.zip external_llvm-ed33b13a10258fe1589bf6a76d6d65ec33823076.tar.gz external_llvm-ed33b13a10258fe1589bf6a76d6d65ec33823076.tar.bz2 |
Do not count kill, implicit_def instructions as printed instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102453 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 8 | ||||
-rw-r--r-- | test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index f000a70..2e40753 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -531,11 +531,11 @@ void AsmPrinter::EmitFunctionBody() { for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end(); II != IE; ++II) { // Print the assembly for the instruction. - if (!II->isLabel()) + if (!II->isLabel() && !II->isImplicitDef() && !II->isKill()) { HasAnyRealCode = true; - - ++EmittedInsts; - + ++EmittedInsts; + } + if (ShouldPrintDebugScopes) { if (TimePassesIsEnabled) { NamedRegionTimer T(DbgTimerName, DWARFGroupName); diff --git a/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll b/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll index 8e38fe3..17cb2b3 100644 --- a/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll +++ b/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll @@ -1,5 +1,5 @@ ; RUN: llc < %s -march=x86-64 -o %t -stats -info-output-file - | \ -; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 10 +; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 9 ; RUN: grep {leal 1(\%rsi),} %t define fastcc zeroext i8 @fullGtU(i32 %i1, i32 %i2, i8* %ptr) nounwind optsize { |