1 ; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s
3 ; A test to make sure that we can look through bitcasts of
4 ; vector types when a base pointer is contained in a vector.
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:1"
7 target triple = "x86_64-unknown-linux-gnu"
9 declare ptr addrspace(1) @foo()
11 ; Function Attrs: uwtable
12 define i32 @test() gc "statepoint-example" {
16 ; CHECK: %bc = bitcast
17 ; CHECK: %[[p1:[A-Za-z0-9_.]+]] = extractelement
18 ; CHECK: %[[p2:[A-Za-z0-9_]+]] = extractelement
19 ; CHECK: llvm.experimental.gc.statepoint
20 ; CHECK: %[[p2]].relocated = {{.+}} @llvm.experimental.gc.relocate
21 ; CHECK: %[[p1]].relocated = {{.+}} @llvm.experimental.gc.relocate
23 %bc = bitcast <8 x ptr addrspace(1)> undef to <8 x ptr addrspace(1)>
24 %ptr= extractelement <8 x ptr addrspace(1)> %bc, i32 7
25 %0 = call ptr addrspace(1) @foo() [ "deopt"() ]
26 %1 = load atomic i32, ptr addrspace(1) %ptr unordered, align 4