llvm.org GIT mirror llvm / af3b6be
[RewriteStatepointsForGC] Remove obsolete assertion This is assertion is no longer necessary since we never record constants in the live set anyway. (They are never recorded in the initial live set, and constant bases are removed near line 2119) Differential Revision: http://reviews.llvm.org/D20293 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269764 91177308-0d34-0410-b5e6-96231b3b80d8 Igor Laevsky 3 years ago
2 changed file(s) with 22 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
10541054 DT->dominates(cast(base)->getParent(),
10551055 cast(ptr)->getParent())) &&
10561056 "The base we found better dominate the derived pointer");
1057
1058 // If you see this trip and like to live really dangerously, the code should
1059 // be correct, just with idioms the verifier can't handle. You can try
1060 // disabling the verifier at your own substantial risk.
1061 assert(!isa(base) &&
1062 "the relocation code needs adjustment to handle the relocation of "
1063 "a null pointer constant without causing false positives in the "
1064 "safepoint ir verifier.");
10651057 }
10661058 }
10671059
9494 %res = extractelement <2 x i8 addrspace(1)*> , i32 0
9595 ret i8 addrspace(1)* %res
9696 }
97
98 define i8 addrspace(1)* @test6(i64 %arg) gc "statepoint-example" {
99 entry:
100 ; Don't fail any assertions and don't record null as a live value
101 ; CHECK-LABEL: test6
102 ; CHECK: gc.statepoint
103 ; CHECK-NOT: call {{.*}}gc.relocate
104 %load_addr = getelementptr i8, i8 addrspace(1)* null, i64 %arg
105 call void @foo() [ "deopt"() ]
106 ret i8 addrspace(1)* %load_addr
107 }
108
109 define i8 addrspace(1)* @test7(i64 %arg) gc "statepoint-example" {
110 entry:
111 ; Same as test7 but use regular constant instead of a null
112 ; CHECK-LABEL: test7
113 ; CHECK: gc.statepoint
114 ; CHECK-NOT: call {{.*}}gc.relocate
115 %load_addr = getelementptr i8, i8 addrspace(1)* inttoptr (i64 15 to i8 addrspace(1)*), i64 %arg
116 call void @foo() [ "deopt"() ]
117 ret i8 addrspace(1)* %load_addr
118 }