Changes in directory llvm/lib/CodeGen:
VirtRegMap.cpp updated: 1.86 -> 1.87 --- Log message: Proper fix for PR1037: http://llvm.org/PR1037 : to determine is a VR is a modref, check 1) whether it is tied to another oeprand, 2) whether is is being tied to by another operand. So the destination operand of a two-address MI can be correctly identified. --- Diffs of the changes: (+4 -2) VirtRegMap.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.86 llvm/lib/CodeGen/VirtRegMap.cpp:1.87 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.86 Thu Dec 7 10:21:19 2006 +++ llvm/lib/CodeGen/VirtRegMap.cpp Fri Dec 8 02:02:34 2006 @@ -97,7 +97,9 @@ } ModRef MRInfo; - if (TII.getOperandConstraint(OldMI->getOpcode(), OpNo, TOI::TIED_TO)) { + const TargetInstrDescriptor *TID = OldMI->getInstrDescriptor(); + if (TID->getOperandConstraint(OpNo, TOI::TIED_TO) != -1 || + TII.findTiedToSrcOperand(TID, OpNo) != -1) { // Folded a two-address operand. MRInfo = isModRef; } else if (OldMI->getOperand(OpNo).isDef()) { @@ -849,7 +851,7 @@ // If this def is part of a two-address operand, make sure to execute // the store from the correct physical register. unsigned PhysReg; - int TiedOp = TII->findTiedToSrcOperand(MI.getOpcode(), i); + int TiedOp = TII->findTiedToSrcOperand(MI.getInstrDescriptor(), i); if (TiedOp != -1) PhysReg = MI.getOperand(TiedOp).getReg(); else { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits