aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/GlobalOpt/blockaddress.ll
blob: 13da76299d5db4c4bc9c8921d540f1c011e764d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: opt < %s -globalopt -S | FileCheck %s

@x = internal global i8* zeroinitializer

define void @f() {
; CHECK: @f

; Check that we don't hit an assert in Constant::IsThreadDependent()
; when storing this blockaddress into a global.

  store i8* blockaddress(@g, %here), i8** @x, align 8
  ret void
}

define void @g() {
; CHECK: @g

here:
  ret void
}