[llvm] r199365 - Copy segment register when optimizing to MOV8ao8/MOV16ao16/MOV32ao32.
Craig Topper
craig.topper at gmail.com
Wed Jan 15 23:57:46 PST 2014
Author: ctopper
Date: Thu Jan 16 01:57:45 2014
New Revision: 199365
URL: http://llvm.org/viewvc/llvm-project?rev=199365&view=rev
Log:
Copy segment register when optimizing to MOV8ao8/MOV16ao16/MOV32ao32.
Modified:
llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=199365&r1=199364&r2=199365&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Thu Jan 16 01:57:45 2014
@@ -323,15 +323,16 @@ static void SimplifyShortMoveForm(X86Asm
if (Absolute &&
(Inst.getOperand(AddrBase + 0).getReg() != 0 ||
Inst.getOperand(AddrBase + 2).getReg() != 0 ||
- Inst.getOperand(AddrBase + 4).getReg() != 0 ||
Inst.getOperand(AddrBase + 1).getImm() != 1))
return;
// If so, rewrite the instruction.
MCOperand Saved = Inst.getOperand(AddrOp);
+ MCOperand Seg = Inst.getOperand(AddrBase + 4);
Inst = MCInst();
Inst.setOpcode(Opcode);
Inst.addOperand(Saved);
+ Inst.addOperand(Seg);
}
static unsigned getRetOpcode(const X86Subtarget &Subtarget)
More information about the llvm-commits
mailing list