From 2f5993bcf116119e5ee5cbc90dae09bf43a581c5 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 5 Sep 2006 08:32:49 +0000 Subject: [PATCH] Fix a few dejagnu failures. e.g. fast-cc-merge-stack-adj.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30113 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86RegisterInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index e4c05c6db25..1751e9c4d1c 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -933,12 +933,12 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF, if ((PI->getOpcode() == X86::ADD32ri || PI->getOpcode() == X86::ADD32ri8) && PI->getOperand(0).getReg() == X86::ESP) { - NumBytes += PI->getOperand(1).getImmedValue(); + NumBytes += PI->getOperand(2).getImmedValue(); MBB.erase(PI); } else if ((PI->getOpcode() == X86::SUB32ri || PI->getOpcode() == X86::SUB32ri8) && PI->getOperand(0).getReg() == X86::ESP) { - NumBytes -= PI->getOperand(1).getImmedValue(); + NumBytes -= PI->getOperand(2).getImmedValue(); MBB.erase(PI); } else if (PI->getOpcode() == X86::ADJSTACKPTRri) { NumBytes += PI->getOperand(1).getImmedValue();