@@ -9,45 +9,45 @@ sil_stage canonical
9
9
import Builtin
10
10
import Swift
11
11
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 }
13
13
sil_scope 3 { loc "sroa.swift":2:7 parent 2 }
14
14
sil_scope 4 { loc "sroa.swift":2:16 parent 2 }
15
15
16
16
// 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
21
21
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
23
23
// Make sure SROA propagate the debug info to the splitted alloc_stack instructions
24
24
// CHECK-SROA: alloc_stack $Builtin.Int64, var
25
25
// 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
27
27
// CHECK-SROA-SAME: loc * "<compiler-generated>":0:0
28
28
// CHECK-SROA: alloc_stack $Builtin.Int64, var
29
29
// 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
31
31
// CHECK-SROA-SAME: loc * "<compiler-generated>":0:0
32
32
33
33
// 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
36
36
%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
41
41
%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
46
46
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
51
51
52
52
// CHECK-IR: call void @llvm.dbg.value(metadata i64 %0
53
53
// CHECK-IR-SAME: metadata ![[MY_TUP_MD:[0-9]+]]
@@ -59,8 +59,8 @@ bb0(%0 : $Int, %1 : $Int):
59
59
// CHECK-IR: call void @llvm.dbg.value(metadata i64 %0, metadata ![[ARG1_MD:[0-9]+]]
60
60
// CHECK-IR: call void @llvm.dbg.value(metadata i64 %1, metadata ![[ARG2_MD:[0-9]+]]
61
61
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
64
64
} // end sil function 'foo'
65
65
66
66
0 commit comments