For inline asm output operand that matches an input. Encode the input operand index...
[oota-llvm.git] / lib / CodeGen / SelectionDAG / LegalizeDAG.cpp
index fd08ee688df7c0785d2f5387d85845c921b049a6..888eeda2652eec9afd2a3bf8794c911e530d2d0c 100644 (file)
@@ -1974,7 +1974,8 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) {
 
     bool HasInFlag = Ops.back().getValueType() == MVT::Flag;
     for (unsigned i = 2, e = Ops.size()-HasInFlag; i < e; ) {
-      unsigned NumVals = cast<ConstantSDNode>(Ops[i])->getZExtValue() >> 3;
+      unsigned NumVals = InlineAsm::
+        getNumOperandRegisters(cast<ConstantSDNode>(Ops[i])->getZExtValue());
       for (++i; NumVals; ++i, --NumVals) {
         SDValue Op = LegalizeOp(Ops[i]);
         if (Op != Ops[i]) {