[llvm-commits] [llvm] r165568 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/atomic-minmax-i6432.ll
Evan Cheng
evan.cheng at apple.com
Wed Oct 10 17:04:17 PDT 2012
Good question. I'm not sure it's always going to be correct to copy over the target flags either. After thinking about it, I think copying over as the default behavior is better. I'll make that change.
Evan
On Oct 10, 2012, at 1:56 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> 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