1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/Transforms/GlobalOpt/blockaddress.ll
Hans Wennborg 220b5e3636 Constant::IsThreadDependent(): Use dyn_cast<Constant> instead of cast
It turns out that the operands of a Constant are not always themselves
Constant. For example, one of the operands of BlockAddress is
BasicBlock, which is not a Constant.

This should fix the dragonegg-x86_64-linux-gcc-4.6-test build which
broke in r168037.

llvm-svn: 168147
2012-11-16 10:33:25 +00:00

21 lines
357 B
LLVM

; 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
}