@@ -25,33 +25,33 @@ entry:
25
25
unreachable
26
26
27
27
; CHECK: entry:
28
- ; CHECK-NEXT: %malloccall = tail call ptr @malloc([[PTR]] 40)
29
- ; CHECK-NEXT: store i32 0, ptr %malloccall , align 4
28
+ ; CHECK-NEXT: %setjmpTable = tail call ptr @malloc([[PTR]] 40)
29
+ ; CHECK-NEXT: store i32 0, ptr %setjmpTable , align 4
30
30
; CHECK-NEXT: %setjmpTableSize = add i32 4, 0
31
31
; CHECK-NEXT: br label %setjmp.dispatch
32
32
33
33
; CHECK: setjmp.dispatch:
34
- ; CHECK-NEXT: %val8 = phi i32 [ %val, %if.end ], [ undef, %entry ]
35
- ; CHECK-NEXT: %buf7 = phi ptr [ %buf6 , %if.end ], [ undef, %entry ]
36
- ; CHECK-NEXT: %setjmpTableSize4 = phi i32 [ %setjmpTableSize5 , %if.end ], [ %setjmpTableSize, %entry ]
37
- ; CHECK-NEXT: %setjmpTable2 = phi ptr [ %setjmpTable3 , %if.end ], [ %malloccall , %entry ]
34
+ ; CHECK-NEXT: %[[VAL2:.*]] = phi i32 [ %val, %if.end ], [ undef, %entry ]
35
+ ; CHECK-NEXT: %[[BUF:.*]] = phi ptr [ %[[BUF2:.*]] , %if.end ], [ undef, %entry ]
36
+ ; CHECK-NEXT: %[[SETJMPTABLESIZE2:.*]] = phi i32 [ %[[SETJMPTABLESIZE3:.*]] , %if.end ], [ %setjmpTableSize, %entry ]
37
+ ; CHECK-NEXT: %[[SETJMPTABLE2:.*]] = phi ptr [ %[[SETJMPTABLE3:.*]] , %if.end ], [ %setjmpTable , %entry ]
38
38
; CHECK-NEXT: %label.phi = phi i32 [ %label, %if.end ], [ -1, %entry ]
39
39
; CHECK-NEXT: switch i32 %label.phi, label %entry.split [
40
40
; CHECK-NEXT: i32 1, label %entry.split.split
41
41
; CHECK-NEXT: ]
42
42
43
43
; CHECK: entry.split:
44
44
; CHECK-NEXT: %buf = alloca [1 x %struct.__jmp_buf_tag], align 16
45
- ; CHECK-NEXT: %setjmpTable = call ptr @saveSetjmp(ptr %buf, i32 1, ptr %setjmpTable2 , i32 %setjmpTableSize4 )
46
- ; CHECK-NEXT: %setjmpTableSize1 = call i32 @getTempRet0()
45
+ ; CHECK-NEXT: %[[SETJMPTABLE4:.*]] = call ptr @saveSetjmp(ptr %buf, i32 1, ptr %[[SETJMPTABLE2]] , i32 %[[SETJMPTABLESIZE2]] )
46
+ ; CHECK-NEXT: %[[SETJMPTABLESIZE4:.*]] = call i32 @getTempRet0()
47
47
; CHECK-NEXT: br label %entry.split.split
48
48
49
49
; CHECK: entry.split.split:
50
- ; CHECK-NEXT: %buf6 = phi ptr [ %buf7 , %setjmp.dispatch ], [ %buf, %entry.split ]
51
- ; CHECK-NEXT: %setjmpTableSize5 = phi i32 [ %setjmpTableSize1 , %entry.split ], [ %setjmpTableSize4 , %setjmp.dispatch ]
52
- ; CHECK-NEXT: %setjmpTable3 = phi ptr [ %setjmpTable , %entry.split ], [ %setjmpTable2 , %setjmp.dispatch ]
53
- ; CHECK-NEXT: %setjmp.ret = phi i32 [ 0, %entry.split ], [ %val8 , %setjmp.dispatch ]
54
- ; CHECK-NEXT: invoke void @__wasm_longjmp(ptr %buf6 , i32 1)
50
+ ; CHECK-NEXT: %[[BUF2]] = phi ptr [ %[[BUF]] , %setjmp.dispatch ], [ %buf, %entry.split ]
51
+ ; CHECK-NEXT: %[[SETJMPTABLESIZE3]] = phi i32 [ %[[SETJMPTABLESIZE4]] , %entry.split ], [ %[[SETJMPTABLESIZE2]] , %setjmp.dispatch ]
52
+ ; CHECK-NEXT: %[[SETJMPTABLE3]] = phi ptr [ %[[SETJMPTABLE4]] , %entry.split ], [ %[[SETJMPTABLE2]] , %setjmp.dispatch ]
53
+ ; CHECK-NEXT: %setjmp.ret = phi i32 [ 0, %entry.split ], [ %[[VAL2]] , %setjmp.dispatch ]
54
+ ; CHECK-NEXT: invoke void @__wasm_longjmp(ptr %[[BUF2]] , i32 1)
55
55
; CHECK-NEXT: to label %.noexc unwind label %catch.dispatch.longjmp
56
56
57
57
; CHECK: .noexc:
@@ -68,12 +68,12 @@ entry:
68
68
; CHECK-NEXT: %env = load ptr, ptr %env_gep, align {{.*}}
69
69
; CHECK-NEXT: %val = load i32, ptr %val_gep, align 4
70
70
; CHECK-NEXT: %setjmp.id = load [[PTR]], ptr %env, align {{.*}}
71
- ; CHECK-NEXT: %label = call i32 @testSetjmp([[PTR]] %setjmp.id, ptr %setjmpTable3 , i32 %setjmpTableSize5 ) [ "funclet"(token %1) ]
71
+ ; CHECK-NEXT: %label = call i32 @testSetjmp([[PTR]] %setjmp.id, ptr %[[SETJMPTABLE3]] , i32 %[[SETJMPTABLESIZE3]] ) [ "funclet"(token %1) ]
72
72
; CHECK-NEXT: %2 = icmp eq i32 %label, 0
73
73
; CHECK-NEXT: br i1 %2, label %if.then, label %if.end
74
74
75
75
; CHECK: if.then:
76
- ; CHECK-NEXT: tail call void @free(ptr %setjmpTable3 ) [ "funclet"(token %1) ]
76
+ ; CHECK-NEXT: tail call void @free(ptr %[[SETJMPTABLE3]] ) [ "funclet"(token %1) ]
77
77
; CHECK-NEXT: call void @__wasm_longjmp(ptr %env, i32 %val) [ "funclet"(token %1) ]
78
78
; CHECK-NEXT: unreachable
79
79
0 commit comments