File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -3574,6 +3574,7 @@ void LargeLoadableHeuristic::propagate(PostOrderFunctionInfo &po) {
35743574 for (auto *BB : po.getPostOrder ()) {
35753575 for (auto &I : llvm::reverse (*BB)) {
35763576 switch (I.getKind ()) {
3577+ case SILInstructionKind::UncheckedBitwiseCastInst:
35773578 case SILInstructionKind::TupleExtractInst:
35783579 case SILInstructionKind::StructExtractInst: {
35793580 auto &proj = cast<SingleValueInstruction>(I);
Original file line number Diff line number Diff line change @@ -425,3 +425,23 @@ bb0(%0 : $member_id_t):
425425 %13 = tuple ()
426426 return %13 : $()
427427}
428+
429+ struct Z {
430+ var r: String
431+ var p: X
432+ }
433+
434+ // CHECK: sil @test17 : $@convention(thin) (@owned String) -> () {
435+ // CHECK: bb0(%0 : $String):
436+ // CHECK: [[T0:%.*]] = alloc_stack $String
437+ // CHECK: store %0 to [[T0]] : $*String
438+ // CHECK: [[T1:%.*]] = unchecked_addr_cast [[T0]] : $*String to $*Z
439+ // CHECK: release_value_addr [[T1]] : $*Z
440+
441+ sil @test17: $@convention(thin) (@owned String) -> () {
442+ bb0(%0 : $String):
443+ %1 = unchecked_bitwise_cast %0 : $String to $Z
444+ release_value %1 : $Z
445+ %13 = tuple ()
446+ return %13 : $()
447+ }
You can’t perform that action at this time.
0 commit comments