[llvm-commits] [llvm] r165568 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/atomic-minmax-i6432.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Oct 10 13:56:33 PDT 2012
On Oct 9, 2012, at 4:48 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> MIB = BuildMI(thisMBB, DL, TII->get(LOADOpc), X86::EDX);
> for (unsigned i = 0; i < X86::AddrNumOperands; ++i) {
> - if (i == X86::AddrDisp)
> + if (i == X86::AddrDisp) {
> MIB.addDisp(MI->getOperand(MemOpndSlot + i), 4); // 4 == sizeof(i32)
> - else
> + // Don't forget to transfer the target flag.
> + MachineOperand &MO = MIB->getOperand(MIB->getNumOperands()-1);
> + MO.setTargetFlags(MI->getOperand(MemOpndSlot + i).getTargetFlags());
> + } else
Is it ever desirable to have MIB.addDisp() discard the target flags?
Perhaps it should always copy the flags?
/jakob
More information about the llvm-commits
mailing list