From 1db99b1949be197b14d6dc85a1a96b543e3c7295 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Feb 2004 06:02:15 +0000 Subject: [PATCH] Whoops, got my cases swapped. llvm-svn: 11526 --- lib/Target/X86/PeepholeOptimizer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Target/X86/PeepholeOptimizer.cpp b/lib/Target/X86/PeepholeOptimizer.cpp index 4d90baa071d..e2b4a46d0cf 100644 --- a/lib/Target/X86/PeepholeOptimizer.cpp +++ b/lib/Target/X86/PeepholeOptimizer.cpp @@ -146,12 +146,8 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB, case X86::XORri32: Opcode = X86::XORri32b; break; } unsigned R0 = MI->getOperand(0).getReg(); - unsigned Scale = MI->getOperand(1).getImmedValue(); - unsigned R1 = MI->getOperand(2).getReg(); - unsigned Offset = MI->getOperand(3).getImmedValue(); I = MBB.insert(MBB.erase(I), - BuildMI(Opcode, 5).addReg(R0).addZImm(Scale). - addReg(R1).addSImm(Offset).addZImm((char)Val)); + BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val)); return true; } } @@ -171,8 +167,12 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB, case X86::ANDmi32: Opcode = X86::ANDmi32b; break; } unsigned R0 = MI->getOperand(0).getReg(); + unsigned Scale = MI->getOperand(1).getImmedValue(); + unsigned R1 = MI->getOperand(2).getReg(); + unsigned Offset = MI->getOperand(3).getImmedValue(); I = MBB.insert(MBB.erase(I), - BuildMI(Opcode, 1, R0, MOTy::UseAndDef).addZImm((char)Val)); + BuildMI(Opcode, 5).addReg(R0).addZImm(Scale). + addReg(R1).addSImm(Offset).addZImm((char)Val)); return true; } }