From: Evan Cheng Date: Thu, 7 Dec 2006 00:46:04 +0000 (+0000) Subject: getOperandConstraint returns -1 if the operand does have the specific constraint... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6065f66e7c3fbde299a387d8a42c2d3a57d13c38;p=oota-llvm.git getOperandConstraint returns -1 if the operand does have the specific constraint. This bug was causing excessive spills. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32295 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 359294d18e4..60a773b3b03 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -97,7 +97,7 @@ void VirtRegMap::virtFolded(unsigned VirtReg, MachineInstr *OldMI, } ModRef MRInfo; - if (TII.getOperandConstraint(OldMI->getOpcode(), OpNo, TOI::TIED_TO)) { + if (TII.getOperandConstraint(OldMI->getOpcode(), OpNo, TOI::TIED_TO) != -1) { // Folded a two-address operand. MRInfo = isModRef; } else if (OldMI->getOperand(OpNo).isDef()) {