mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129753 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b44101c140
commit
ff009ad1e1
@ -1535,11 +1535,12 @@ bool X86FastISel::X86SelectCall(const Instruction *I) {
|
||||
}
|
||||
|
||||
unsigned ArgReg;
|
||||
|
||||
// Passing bools around ends up doing a trunc to i1 and passing it.
|
||||
// Codegen this as an argument + "and 1".
|
||||
if (ArgVal->getType()->isIntegerTy(1) && isa<TruncInst>(ArgVal) &&
|
||||
cast<TruncInst>(ArgVal)->getParent() == I->getParent() &&
|
||||
ArgVal->hasOneUse()) {
|
||||
// Passing bools around ends up doing a trunc to i1 and passing it.
|
||||
// Codegen this as an argument + "and 1".
|
||||
ArgVal = cast<TruncInst>(ArgVal)->getOperand(0);
|
||||
ArgReg = getRegForValue(ArgVal);
|
||||
if (ArgReg == 0) return false;
|
||||
@ -1551,9 +1552,10 @@ bool X86FastISel::X86SelectCall(const Instruction *I) {
|
||||
ArgVal->hasOneUse(), 1);
|
||||
} else {
|
||||
ArgReg = getRegForValue(ArgVal);
|
||||
if (ArgReg == 0) return false;
|
||||
}
|
||||
|
||||
if (ArgReg == 0) return false;
|
||||
|
||||
// FIXME: Only handle *easy* calls for now.
|
||||
if (CS.paramHasAttr(AttrInd, Attribute::InReg) ||
|
||||
CS.paramHasAttr(AttrInd, Attribute::StructRet) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user