Use "isa" since the variable isn't used.
[llvm-complete.git] / test / Transforms / RewriteStatepointsForGC / relocate-invoke-result.ll
blobd198b2727780d8eaa83a2166d964703d9a1576af
2 ;; RUN: opt -rewrite-statepoints-for-gc -verify -S < %s | FileCheck %s
3 ;; RUN: opt -passes=rewrite-statepoints-for-gc -verify -S < %s | FileCheck %s
4 ;; This test is to verify that RewriteStatepointsForGC correctly relocates values
5 ;; defined by invoke instruction results. 
7 declare i64* addrspace(1)* @non_gc_call() "gc-leaf-function"
9 declare void @gc_call()
11 declare i32* @fake_personality_function()
13 define i64* addrspace(1)* @test() gc "statepoint-example" personality i32* ()* @fake_personality_function {
14 ; CHECK-LABEL: @test(
16 entry:
17   %obj = invoke i64* addrspace(1)* @non_gc_call()
18           to label %normal_dest unwind label %unwind_dest
20 unwind_dest:                                      ; preds = %entry
21   %lpad = landingpad { i8*, i32 }
22           cleanup
23   resume { i8*, i32 } undef
25 normal_dest:                                      ; preds = %entry
26 ; CHECK: normal_dest:
27 ; CHECK-NEXT: gc.statepoint
28 ; CHECK-NEXT: %obj.relocated = call coldcc i8 addrspace(1)*
29 ; CHECK-NEXT: bitcast
31   call void @gc_call() [ "deopt"(i32 0, i32 -1, i32 0, i32 0, i32 0) ]
32   ret i64* addrspace(1)* %obj