From: Chris Lattner Date: Fri, 13 Dec 2002 13:07:42 +0000 (+0000) Subject: Fix bork in doMultiply X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=202a2d0e17d4f7d05da3aee2d573f3754d842883;p=oota-llvm.git Fix bork in doMultiply git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5021 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index d9feff1a930..d9759c4eb84 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -684,10 +684,11 @@ ISel::doMultiply(unsigned destReg, const Type *resultType, /// with the EAX register explicitly. /// void ISel::visitMul(BinaryOperator &I) { + unsigned DestReg = getReg(I); + unsigned Op0Reg = getReg(I.getOperand(0)); + unsigned Op1Reg = getReg(I.getOperand(1)); MachineBasicBlock::iterator MBBI = BB->end(); - doMultiply (getReg (I), I.getType (), - getReg (I.getOperand (0)), getReg (I.getOperand (1)), - BB, MBBI); + doMultiply(DestReg, I.getType(), Op0Reg, Op1Reg, BB, MBBI); } diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index d9feff1a930..d9759c4eb84 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -684,10 +684,11 @@ ISel::doMultiply(unsigned destReg, const Type *resultType, /// with the EAX register explicitly. /// void ISel::visitMul(BinaryOperator &I) { + unsigned DestReg = getReg(I); + unsigned Op0Reg = getReg(I.getOperand(0)); + unsigned Op1Reg = getReg(I.getOperand(1)); MachineBasicBlock::iterator MBBI = BB->end(); - doMultiply (getReg (I), I.getType (), - getReg (I.getOperand (0)), getReg (I.getOperand (1)), - BB, MBBI); + doMultiply(DestReg, I.getType(), Op0Reg, Op1Reg, BB, MBBI); }