Skip to content

Commit 5ee4e9b

Browse files
committed
Remove br undef in SafePointIRVerifier directory
1 parent f1146b2 commit 5ee4e9b

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

llvm/test/SafepointIRVerifier/from-same-relocation-in-phi-nodes.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
; In %merge %val.unrelocated, %ptr and %arg should be unrelocated.
55
; FIXME: if this test fails it is a false-positive alarm. IR is correct.
6-
define void @test.unrelocated-phi.ok(ptr addrspace(1) %arg) gc "statepoint-example" {
6+
define void @test.unrelocated-phi.ok(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
77
; CHECK-LABEL: Verifying gc pointers in function: test.unrelocated-phi.ok
88
bci_0:
99
%ptr = getelementptr i8, ptr addrspace(1) %arg, i64 4
10-
br i1 undef, label %left, label %right
10+
br i1 %new_arg, label %left, label %right
1111

1212
left:
1313
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr undef, i32 0, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0)

llvm/test/SafepointIRVerifier/unrecorded-live-at-sp.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ declare ptr addrspace(1) @generate_obj2() #1
1414
declare ptr addrspace(1) @generate_obj3() #1
1515

1616
; Function Attrs: nounwind
17-
define void @test(ptr addrspace(1), ptr addrspace(1), i32) #3 gc "statepoint-example" {
17+
define void @test(ptr addrspace(1), ptr addrspace(1), i32, i1 %new_arg) #3 gc "statepoint-example" {
1818
bci_0:
1919
%result608 = call ptr addrspace(1) @generate_obj3()
2020
br label %bci_37-aload
@@ -24,7 +24,7 @@ bci_37-aload: ; preds = %not_zero179, %bci_0
2424
%base_phi2 = phi ptr addrspace(1) [ %base_phi3, %not_zero179 ], [ %result608, %bci_0 ], !is_base_value !0
2525
%relocated8 = phi ptr addrspace(1) [ %relocated7.relocated, %not_zero179 ], [ %result608, %bci_0 ]
2626
%tmp3 = getelementptr inbounds %jObject, ptr addrspace(1) %relocated8, i64 0, i32 0, i64 32
27-
br i1 undef, label %not_zero179, label %not_zero146
27+
br i1 %new_arg, label %not_zero179, label %not_zero146
2828

2929
not_zero146: ; preds = %bci_37-aload
3030
%addr98.relocated = call ptr addrspace(1) @generate_obj2() #1

llvm/test/SafepointIRVerifier/uses-in-phi-nodes.ll

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
; RUN: opt -safepoint-ir-verifier-print-only -verify-safepoint-ir -S %s 2>&1 | FileCheck %s
22

3-
define ptr addrspace(1) @test.not.ok.0(ptr addrspace(1) %arg) gc "statepoint-example" {
3+
define ptr addrspace(1) @test.not.ok.0(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
44
; CHECK-LABEL: Verifying gc pointers in function: test.not.ok.0
55
bci_0:
6-
br i1 undef, label %left, label %right
6+
br i1 %new_arg, label %left, label %right
77

88
left:
99
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
@@ -20,10 +20,10 @@ define ptr addrspace(1) @test.not.ok.0(ptr addrspace(1) %arg) gc "statepoint-exa
2020
ret ptr addrspace(1) %val
2121
}
2222

23-
define ptr addrspace(1) @test.not.ok.1(ptr addrspace(1) %arg) gc "statepoint-example" {
23+
define ptr addrspace(1) @test.not.ok.1(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
2424
; CHECK-LABEL: Verifying gc pointers in function: test.not.ok.1
2525
bci_0:
26-
br i1 undef, label %left, label %right
26+
br i1 %new_arg, label %left, label %right
2727

2828
left:
2929
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
@@ -40,10 +40,10 @@ define ptr addrspace(1) @test.not.ok.1(ptr addrspace(1) %arg) gc "statepoint-exa
4040
ret ptr addrspace(1) %val
4141
}
4242

43-
define ptr addrspace(1) @test.ok.0(ptr addrspace(1) %arg) gc "statepoint-example" {
43+
define ptr addrspace(1) @test.ok.0(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
4444
; CHECK: No illegal uses found by SafepointIRVerifier in: test.ok.0
4545
bci_0:
46-
br i1 undef, label %left, label %right
46+
br i1 %new_arg, label %left, label %right
4747

4848
left:
4949
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)
@@ -57,10 +57,10 @@ define ptr addrspace(1) @test.ok.0(ptr addrspace(1) %arg) gc "statepoint-example
5757
ret ptr addrspace(1) %val
5858
}
5959

60-
define ptr addrspace(1) @test.ok.1(ptr addrspace(1) %arg) gc "statepoint-example" {
60+
define ptr addrspace(1) @test.ok.1(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
6161
; CHECK: No illegal uses found by SafepointIRVerifier in: test.ok.1
6262
bci_0:
63-
br i1 undef, label %left, label %right
63+
br i1 %new_arg, label %left, label %right
6464

6565
left:
6666
call void @not_statepoint()
@@ -75,10 +75,10 @@ define ptr addrspace(1) @test.ok.1(ptr addrspace(1) %arg) gc "statepoint-example
7575
}
7676

7777
; It should be allowed to compare poisoned ptr with null.
78-
define void @test.poisoned.cmp.ok(ptr addrspace(1) %arg) gc "statepoint-example" {
78+
define void @test.poisoned.cmp.ok(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
7979
; CHECK-LABEL: Verifying gc pointers in function: test.poisoned.cmp.ok
8080
bci_0:
81-
br i1 undef, label %left, label %right
81+
br i1 %new_arg, label %left, label %right
8282

8383
left:
8484
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
@@ -97,10 +97,10 @@ define void @test.poisoned.cmp.ok(ptr addrspace(1) %arg) gc "statepoint-example"
9797
}
9898

9999
; It is illegal to compare poisoned ptr and relocated.
100-
define void @test.poisoned.cmp.fail.0(ptr addrspace(1) %arg) gc "statepoint-example" {
100+
define void @test.poisoned.cmp.fail.0(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
101101
; CHECK-LABEL: Verifying gc pointers in function: test.poisoned.cmp.fail.0
102102
bci_0:
103-
br i1 undef, label %left, label %right
103+
br i1 %new_arg, label %left, label %right
104104

105105
left:
106106
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
@@ -123,10 +123,10 @@ define void @test.poisoned.cmp.fail.0(ptr addrspace(1) %arg) gc "statepoint-exam
123123
}
124124

125125
; It is illegal to compare poisoned ptr and unrelocated.
126-
define void @test.poisoned.cmp.fail.1(ptr addrspace(1) %arg) gc "statepoint-example" {
126+
define void @test.poisoned.cmp.fail.1(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
127127
; CHECK-LABEL: Verifying gc pointers in function: test.poisoned.cmp.fail.1
128128
bci_0:
129-
br i1 undef, label %left, label %right
129+
br i1 %new_arg, label %left, label %right
130130

131131
left:
132132
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live"(ptr addrspace(1) %arg)]
@@ -148,10 +148,10 @@ define void @test.poisoned.cmp.fail.1(ptr addrspace(1) %arg) gc "statepoint-exam
148148
}
149149

150150
; It should be allowed to compare unrelocated phi with unrelocated value.
151-
define void @test.unrelocated-phi.cmp.ok(ptr addrspace(1) %arg) gc "statepoint-example" {
151+
define void @test.unrelocated-phi.cmp.ok(ptr addrspace(1) %arg, i1 %new_arg) gc "statepoint-example" {
152152
; CHECK-LABEL: Verifying gc pointers in function: test.unrelocated-phi.cmp.ok
153153
bci_0:
154-
br i1 undef, label %left, label %right
154+
br i1 %new_arg, label %left, label %right
155155

156156
left:
157157
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0)

0 commit comments

Comments
 (0)