[llvm-commits] [llvm] r162733 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h include/llvm/Target/TargetSelectionDAG.td lib/CodeGen/SelectionDAG/SelectionDAG.cpp test/CodeGen/Hexagon/newvaluejump.ll test/CodeGen/Hexagon/newvaluestore.l

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Aug 29 13:52:05 PDT 2012


On Aug 29, 2012, at 11:45 AM, Eli Friedman <eli.friedman at gmail.com> wrote:

>> +  unsigned Flags = MachineMemOperand::MOVolatile;
>> +  if (Opcode != ISD::ATOMIC_STORE)
>> +    Flags |= MachineMemOperand::MOLoad;
>> +  if (Opcode != ISD::ATOMIC_LOAD)
>> +    Flags |= MachineMemOperand::MOStore;
> 
> I'm not sure this is safe; I suppose it depends on how exactly
> "volatile" is defined, though.  Specifically, it's unsafe to move an
> arbitrary load from after an "acquire" load to before it.

OK, r162857 should bring us back to the old behavior.

MachineInstr::isSafeToMove() now treats volatile and atomic loads as if they were 'stores'. Here, 'store' means a barrier for moving a load instruction.

Thanks, Eli

/jakob




More information about the llvm-commits mailing list