Skip to content

Commit 2314df3

Browse files
author
Joe Shajrawi
committed
Handle 'thin' callees in extractStringConcatOperands
1 parent 7e387b7 commit 2314df3

File tree

2 files changed

+395
-7
lines changed

2 files changed

+395
-7
lines changed

lib/SILOptimizer/Utils/Local.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,6 @@ bool StringConcatenationOptimizer::extractStringConcatOperands() {
677677
if (AI->getNumArguments() != 3 || !Fn->hasSemanticsAttr("string.concat"))
678678
return false;
679679

680-
assert(Fn->getRepresentation() == SILFunctionTypeRepresentation::Method);
681-
682680
// Left and right operands of a string concatenation operation.
683681
AILeft = dyn_cast<ApplyInst>(AI->getOperand(1));
684682
AIRight = dyn_cast<ApplyInst>(AI->getOperand(2));
@@ -719,11 +717,6 @@ bool StringConcatenationOptimizer::extractStringConcatOperands() {
719717
AIRightOperandsNum == 5)))
720718
return false;
721719

722-
assert(FRILeftFun->getRepresentation() ==
723-
SILFunctionTypeRepresentation::Method);
724-
assert(FRIRightFun->getRepresentation() ==
725-
SILFunctionTypeRepresentation::Method);
726-
727720
SLILeft = dyn_cast<StringLiteralInst>(AILeft->getOperand(1));
728721
SLIRight = dyn_cast<StringLiteralInst>(AIRight->getOperand(1));
729722

0 commit comments

Comments
 (0)