29 lines · plain
1; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s2;3; A test to make sure that we can look through bitcasts of4; vector types when a base pointer is contained in a vector.5 6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:1"7target triple = "x86_64-unknown-linux-gnu"8 9declare ptr addrspace(1) @foo()10 11; Function Attrs: uwtable12define i32 @test() gc "statepoint-example" {13; CHECK-LABEL: @test14entry:15; CHECK-LABEL: entry16; CHECK: %bc = bitcast17; CHECK: %[[p1:[A-Za-z0-9_.]+]] = extractelement18; CHECK: %[[p2:[A-Za-z0-9_]+]] = extractelement19; CHECK: llvm.experimental.gc.statepoint20; CHECK: %[[p2]].relocated = {{.+}} @llvm.experimental.gc.relocate21; CHECK: %[[p1]].relocated = {{.+}} @llvm.experimental.gc.relocate22; CHECK: load atomic23 %bc = bitcast <8 x ptr addrspace(1)> undef to <8 x ptr addrspace(1)>24 %ptr= extractelement <8 x ptr addrspace(1)> %bc, i32 725 %0 = call ptr addrspace(1) @foo() [ "deopt"() ]26 %1 = load atomic i32, ptr addrspace(1) %ptr unordered, align 427 ret i32 %128}29