Skip to content

Commit 1b9e42c

Browse files
authored
Merge pull request #42612 from atrick/add-check-lines
Add CHECK lines to a test in licm.sil
2 parents 5d55ffe + 0ec14bb commit 1b9e42c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/SILOptimizer/licm.sil

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,25 @@ public struct UInt64Wrapper {
14231423
//
14241424
// The store inside the loop is deleted, and the load is hoisted such
14251425
// that it now loads the UInt64Wrapper instead of Builtin.Int64
1426+
// CHECK-LABEL: sil @testTailProjection : $@convention(thin) () -> () {
1427+
// CHECK: bb0:
1428+
// CHECK: [[A:%.*]] = index_addr %4 : $*UInt64Wrapper, %1 : $Builtin.Word
1429+
// CHECK: store %{{.*}} to [[A]] : $*UInt64Wrapper
1430+
// CHECK: load %5 : $*UInt64Wrapper
1431+
// CHECK: br bb1
1432+
// CHECK: bb1(%{{.*}} : $Builtin.Int64, %{{.*}} : $UInt64Wrapper, [[PHI:%.*]] : $UInt64Wrapper):
1433+
// CHECK: cond_br undef, bb3, bb2
1434+
// CHECK: bb2:
1435+
// CHECK-NOT: (load|store)
1436+
// CHECK: struct_extract [[PHI]] : $UInt64Wrapper, #UInt64Wrapper.rawValue
1437+
// CHECK: struct_extract
1438+
// CHECK: struct $UInt64
1439+
// CHECK: struct $UInt64Wrapper
1440+
// CHECK-NOT: (load|store)
1441+
// CHECK: br bb1
1442+
// CHECK: bb3:
1443+
// CHECK: store [[PHI]] to [[A]] : $*UInt64Wrapper
1444+
// CHECK-LABEL: } // end sil function 'testTailProjection'
14261445
sil @testTailProjection : $@convention(thin) () -> () {
14271446
bb0:
14281447
%0 = integer_literal $Builtin.Int64, 0

0 commit comments

Comments
 (0)