Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/SILOptimizer/LoopTransforms/LoopRotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ canDuplicateOrMoveToPreheader(SILLoop *loop, SILBasicBlock *preheader,
if (isa<DeallocStackInst>(inst)) {
return false;
}
OwnershipForwardingMixin *ofm = nullptr;
if ((ofm = OwnershipForwardingMixin::get(inst)) &&
ofm->getForwardingOwnershipKind() == OwnershipKind::Guaranteed) {
return false;
}
if (isa<FunctionRefInst>(inst)) {
moves.push_back(inst);
invariants.insert(inst);
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/looprotate_nontrivial_ossa.sil
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ exit:
// A guaranteed value whose ownership has been forwarded must not be reborrowed.
//
// CHECK-LABEL: sil [ossa] @forwarded_borrow_cant_be_reborrowed : $@convention(thin) (@owned BoxStruct) -> () {
// CHECK-NOT: {{bb[0-9]+}}({{%[^,]+}} : @guaranteed $BoxStruct, {{%[^,]+}} : @guaranteed $Klass):
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @guaranteed $BoxStruct, {{%[^,]+}} : @guaranteed $Klass):
// CHECK-LABEL: } // end sil function 'forwarded_borrow_cant_be_reborrowed'
sil [ossa] @forwarded_borrow_cant_be_reborrowed : $@convention(thin) (@owned BoxStruct) -> () {
bb0(%0 : @owned $BoxStruct):
Expand Down