mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
eca209183e
A global alias may use indices which are not considered in bounds. In such a case, accessing the base object will fail as it only peers through inbounds accesses. This pattern is used by the swift compiler to create references to preceeding members in the type metadata. This would cause the code generation to fail when targeting a platform that used ELF as the object file format. Be conservative and fail the read-only check if we run into an alias that we cannot peer through. llvm-svn: 345107
18 lines
472 B
LLVM
18 lines
472 B
LLVM
; RUN: llc -mtriple thumbv7-unknown-linux-android -filetype asm -o - %s | FileCheck %s
|
|
|
|
@a = protected constant <{ i32, i32 }> <{ i32 0, i32 0 }>
|
|
@b = protected alias i32, getelementptr(i32, i32* getelementptr inbounds (<{ i32, i32 }>, <{ i32, i32 }>* @a, i32 0, i32 1), i32 -1)
|
|
|
|
declare void @f(i32*)
|
|
|
|
define void @g() {
|
|
entry:
|
|
call void @f(i32* @b)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: g:
|
|
; CHECK: movw [[REGISTER:r[0-9]+]], :lower16:b
|
|
; CHECK: movt [[REGISTER]], :upper16:b
|
|
|