llvm.org GIT mirror llvm / ff009ad
tidy up git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129753 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
1 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
15341534 }
15351535
15361536 unsigned ArgReg;
1537
1538 // Passing bools around ends up doing a trunc to i1 and passing it.
1539 // Codegen this as an argument + "and 1".
15371540 if (ArgVal->getType()->isIntegerTy(1) && isa(ArgVal) &&
15381541 cast(ArgVal)->getParent() == I->getParent() &&
15391542 ArgVal->hasOneUse()) {
1540 // Passing bools around ends up doing a trunc to i1 and passing it.
1541 // Codegen this as an argument + "and 1".
15421543 ArgVal = cast(ArgVal)->getOperand(0);
15431544 ArgReg = getRegForValue(ArgVal);
15441545 if (ArgReg == 0) return false;
15501551 ArgVal->hasOneUse(), 1);
15511552 } else {
15521553 ArgReg = getRegForValue(ArgVal);
1553 if (ArgReg == 0) return false;
1554 }
1554 }
1555
1556 if (ArgReg == 0) return false;
15551557
15561558 // FIXME: Only handle *easy* calls for now.
15571559 if (CS.paramHasAttr(AttrInd, Attribute::InReg) ||