diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCFastISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFastISel.cpp b/llvm/lib/Target/PowerPC/PPCFastISel.cpp index 0b68ba1..ea4e597 100644 --- a/llvm/lib/Target/PowerPC/PPCFastISel.cpp +++ b/llvm/lib/Target/PowerPC/PPCFastISel.cpp @@ -1707,7 +1707,8 @@ bool PPCFastISel::SelectRet(const Instruction *I) { // Special case for returning a constant integer of any size - materialize // the constant as an i64 and copy it to the return register. - if (const ConstantInt *CI = dyn_cast<ConstantInt>(RV)) { + if (isa<ConstantInt>(RV) && RV->getType()->isIntegerTy()) { + const ConstantInt *CI = cast<ConstantInt>(RV); CCValAssign &VA = ValLocs[0]; Register RetReg = VA.getLocReg(); |