1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=rewrite-statepoints-for-gc -S < %s | FileCheck %s
4 define void @test() gc "statepoint-example" personality ptr @zot{
7 ; CHECK-NEXT: [[TMP:%.*]] = freeze ptr addrspace(1) undef
8 ; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8, ptr addrspace(1) [[TMP]], i64 16
9 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @wibble, i32 0, i32 0, i32 0, i32 0) [ "deopt"() ]
10 ; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, ptr addrspace(1) [[TMP3]], i64 undef
11 ; CHECK-NEXT: ret void
14 %tmp = freeze ptr addrspace(1) undef
15 %tmp3 = getelementptr inbounds i8, ptr addrspace(1) %tmp, i64 16
16 call void @wibble() #3 [ "deopt"() ]
17 %tmp5 = getelementptr inbounds i32, ptr addrspace(1) %tmp3, i64 undef
23 declare void @wibble()