@@ -9,45 +9,45 @@ sil_stage canonical
99import Builtin
1010import Swift
1111
12- sil_scope 2 { loc "sroa.swift":1:6 parent @foo : $@convention(thin) (Int, Int ) -> Int }
12+ sil_scope 2 { loc "sroa.swift":1:6 parent @foo : $@convention(thin) (Int64, Int64 ) -> Int64 }
1313sil_scope 3 { loc "sroa.swift":2:7 parent 2 }
1414sil_scope 4 { loc "sroa.swift":2:16 parent 2 }
1515
1616// foo(in_x:in_y:), loc "sroa.swift":1:6, scope 2
17- sil hidden @foo : $@convention(thin) (Int, Int ) -> Int {
18- bb0(%0 : $Int , %1 : $Int ):
19- debug_value %0 : $Int , let, name "in_x", argno 1, loc "sroa.swift":1:10, scope 2
20- debug_value %1 : $Int , let, name "in_y", argno 2, loc "sroa.swift":1:21, scope 2
17+ sil hidden @foo : $@convention(thin) (Int64, Int64 ) -> Int64 {
18+ bb0(%0 : $Int64 , %1 : $Int64 ):
19+ debug_value %0 : $Int64 , let, name "in_x", argno 1, loc "sroa.swift":1:10, scope 2
20+ debug_value %1 : $Int64 , let, name "in_y", argno 2, loc "sroa.swift":1:21, scope 2
2121
22- %4 = alloc_stack $(x: Int , y: Int ), var, name "my_tup", loc "sroa.swift":2:7, scope 3
22+ %4 = alloc_stack $(x: Int64 , y: Int64 ), var, name "my_tup", loc "sroa.swift":2:7, scope 3
2323 // Make sure SROA propagate the debug info to the splitted alloc_stack instructions
2424 // CHECK-SROA: alloc_stack $Builtin.Int64, var
2525 // CHECK-SROA-SAME: (name "my_tup", loc "sroa.swift":2:7
26- // CHECK-SROA-SAME: type $*(x: Int , y: Int ), expr op_tuple_fragment:$(x: Int , y: Int ):0:op_fragment:#Int ._value
26+ // CHECK-SROA-SAME: type $*(x: Int64 , y: Int64 ), expr op_tuple_fragment:$(x: Int64 , y: Int64 ):0:op_fragment:#Int64 ._value
2727 // CHECK-SROA-SAME: loc * "<compiler-generated>":0:0
2828 // CHECK-SROA: alloc_stack $Builtin.Int64, var
2929 // CHECK-SROA-SAME: (name "my_tup", loc "sroa.swift":2:7
30- // CHECK-SROA-SAME: type $*(x: Int , y: Int ), expr op_tuple_fragment:$(x: Int , y: Int ):1:op_fragment:#Int ._value
30+ // CHECK-SROA-SAME: type $*(x: Int64 , y: Int64 ), expr op_tuple_fragment:$(x: Int64 , y: Int64 ):1:op_fragment:#Int64 ._value
3131 // CHECK-SROA-SAME: loc * "<compiler-generated>":0:0
3232
3333 // Make sure the struct fields' SSA values are properly connected to the source variables via op_fragment
34- %5 = tuple_element_addr %4 : $*(x: Int , y: Int ), 0, loc "sroa.swift":2:16, scope 4
35- %6 = tuple_element_addr %4 : $*(x: Int , y: Int ), 1, loc "sroa.swift":2:16, scope 4
34+ %5 = tuple_element_addr %4 : $*(x: Int64 , y: Int64 ), 0, loc "sroa.swift":2:16, scope 4
35+ %6 = tuple_element_addr %4 : $*(x: Int64 , y: Int64 ), 1, loc "sroa.swift":2:16, scope 4
3636 %7 = integer_literal $Builtin.Int64, 0, loc "sroa.swift":2:20, scope 4
37- %8 = struct $Int (%7 : $Builtin.Int64), loc "sroa.swift":2:20, scope 4
38- // CHECK-MEM2REG: %[[FIELD_X:[0-9]+]] = struct_extract %[[INT_X:[0-9]+]] : $Int , #Int ._value, loc "sroa.swift":2:20
39- // CHECK-MEM2REG: debug_value %[[FIELD_X]] : $Builtin.Int64, var, (name "my_tup", loc "sroa.swift":2:7, scope 3), type $*(x: Int , y: Int ), expr op_tuple_fragment:$(x: Int , y: Int ):0:op_fragment:#Int ._value
40- store %8 to %5 : $*Int , loc "sroa.swift":2:20, scope 4
37+ %8 = struct $Int64 (%7 : $Builtin.Int64), loc "sroa.swift":2:20, scope 4
38+ // CHECK-MEM2REG: %[[FIELD_X:[0-9]+]] = struct_extract %[[INT_X:[0-9]+]] : $Int64 , #Int64 ._value, loc "sroa.swift":2:20
39+ // CHECK-MEM2REG: debug_value %[[FIELD_X]] : $Builtin.Int64, var, (name "my_tup", loc "sroa.swift":2:7, scope 3), type $*(x: Int64 , y: Int64 ), expr op_tuple_fragment:$(x: Int64 , y: Int64 ):0:op_fragment:#Int64 ._value
40+ store %8 to %5 : $*Int64 , loc "sroa.swift":2:20, scope 4
4141 %10 = integer_literal $Builtin.Int64, 0, loc "sroa.swift":2:26, scope 4
42- %11 = struct $Int (%10 : $Builtin.Int64), loc "sroa.swift":2:26, scope 4
43- // CHECK-MEM2REG: %[[FIELD_Y:[0-9]+]] = struct_extract %[[INT_Y:[0-9]+]] : $Int , #Int ._value, loc "sroa.swift":2:26
44- // CHECK-MEM2REG: debug_value %[[FIELD_Y]] : $Builtin.Int64, var, (name "my_tup", loc "sroa.swift":2:7, scope 3), type $*(x: Int , y: Int ), expr op_tuple_fragment:$(x: Int , y: Int ):1:op_fragment:#Int ._value
45- store %11 to %6 : $*Int , loc "sroa.swift":2:26, scope 4
42+ %11 = struct $Int64 (%10 : $Builtin.Int64), loc "sroa.swift":2:26, scope 4
43+ // CHECK-MEM2REG: %[[FIELD_Y:[0-9]+]] = struct_extract %[[INT_Y:[0-9]+]] : $Int64 , #Int64 ._value, loc "sroa.swift":2:26
44+ // CHECK-MEM2REG: debug_value %[[FIELD_Y]] : $Builtin.Int64, var, (name "my_tup", loc "sroa.swift":2:7, scope 3), type $*(x: Int64 , y: Int64 ), expr op_tuple_fragment:$(x: Int64 , y: Int64 ):1:op_fragment:#Int64 ._value
45+ store %11 to %6 : $*Int64 , loc "sroa.swift":2:26, scope 4
4646
47- %14 = tuple_element_addr %4 : $*(x: Int , y: Int ), 0, loc "sroa.swift":3:12, scope 3
48- store %0 to %14 : $*Int , loc "sroa.swift":3:12, scope 3
49- %18 = tuple_element_addr %4 : $*(x: Int , y: Int ), 1, loc "sroa.swift":4:12, scope 3
50- store %1 to %18 : $*Int , loc "sroa.swift":4:12, scope 3
47+ %14 = tuple_element_addr %4 : $*(x: Int64 , y: Int64 ), 0, loc "sroa.swift":3:12, scope 3
48+ store %0 to %14 : $*Int64 , loc "sroa.swift":3:12, scope 3
49+ %18 = tuple_element_addr %4 : $*(x: Int64 , y: Int64 ), 1, loc "sroa.swift":4:12, scope 3
50+ store %1 to %18 : $*Int64 , loc "sroa.swift":4:12, scope 3
5151
5252 // CHECK-IR: call void @llvm.dbg.value(metadata i64 %0
5353 // CHECK-IR-SAME: metadata ![[MY_TUP_MD:[0-9]+]]
@@ -59,8 +59,8 @@ bb0(%0 : $Int, %1 : $Int):
5959 // CHECK-IR: call void @llvm.dbg.value(metadata i64 %0, metadata ![[ARG1_MD:[0-9]+]]
6060 // CHECK-IR: call void @llvm.dbg.value(metadata i64 %1, metadata ![[ARG2_MD:[0-9]+]]
6161
62- dealloc_stack %4 : $*(x: Int , y: Int ), loc "sroa.swift":2:7, scope 3
63- return %0 : $Int , loc "sroa.swift":5:3, scope 3
62+ dealloc_stack %4 : $*(x: Int64 , y: Int64 ), loc "sroa.swift":2:7, scope 3
63+ return %0 : $Int64 , loc "sroa.swift":5:3, scope 3
6464} // end sil function 'foo'
6565
6666
0 commit comments