mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Don't refuse to transform constexpr(call(arg, ...)) to call(constexpr(arg), ...)) just because the function has multiple return values even if their return types are the same. Patch by Eduard Burtescu!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199564 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -994,11 +994,12 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
|
||||
Type *OldRetTy = Caller->getType();
|
||||
Type *NewRetTy = FT->getReturnType();
|
||||
|
||||
if (NewRetTy->isStructTy())
|
||||
return false; // TODO: Handle multiple return values.
|
||||
|
||||
// Check to see if we are changing the return type...
|
||||
if (OldRetTy != NewRetTy) {
|
||||
|
||||
if (NewRetTy->isStructTy())
|
||||
return false; // TODO: Handle multiple return values.
|
||||
|
||||
if (!CastInst::isBitCastable(NewRetTy, OldRetTy)) {
|
||||
if (Callee->isDeclaration())
|
||||
return false; // Cannot transform this return value.
|
||||
|
Reference in New Issue
Block a user