diff options
-rw-r--r-- | lib/Target/Sparc/SparcAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/SPARC/64abi.ll | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index e56da1e..d06c894 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -88,7 +88,7 @@ void SparcAsmPrinter::EmitFunctionBodyStart() { const unsigned globalRegs[] = { SP::G2, SP::G3, SP::G6, SP::G7, 0 }; for (unsigned i = 0; globalRegs[i] != 0; ++i) { unsigned reg = globalRegs[i]; - if (!MRI.isPhysRegUsed(reg)) + if (MRI.use_empty(reg)) continue; EmitGlobalRegisterDecl(reg); } diff --git a/test/CodeGen/SPARC/64abi.ll b/test/CodeGen/SPARC/64abi.ll index 00fb99a..8a5c996 100644 --- a/test/CodeGen/SPARC/64abi.ll +++ b/test/CodeGen/SPARC/64abi.ll @@ -380,8 +380,6 @@ define signext i32 @ret_nozext(i32 signext %a0) { ; CHECK-LABEL: test_register_directive ; CHECK: .register %g2, #scratch ; CHECK: .register %g3, #scratch -; CHECK: .register %g6, #ignore -; CHECK: .register %g7, #ignore ; CHECK: add %i0, 2, %g2 ; CHECK: add %i0, 3, %g3 define i32 @test_register_directive(i32 %i0) { |