mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
c3b6ffc431
2. don't bother trying to merge globals in non-default sections, doing so is quite dubious at best anyway. 3. fix a bug reported by Arnaud de Grandmaison where we'd try to merge two globals in different address spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95995 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
752 B
LLVM
31 lines
752 B
LLVM
; RUN: opt < %s -constmerge -S | FileCheck %s
|
|
|
|
; Don't merge constants with specified sections.
|
|
|
|
@T1G1 = internal constant i32 1, section "foo"
|
|
@T1G2 = internal constant i32 1, section "bar"
|
|
@T1G3 = internal constant i32 1, section "bar"
|
|
|
|
; CHECK: @T1G1
|
|
; CHECK: @T1G2
|
|
; CHECK: @T1G3
|
|
|
|
define void @test1(i32** %P1, i32** %P2, i32** %P3) {
|
|
store i32* @T1G1, i32** %P1
|
|
store i32* @T1G2, i32** %P2
|
|
store i32* @T1G3, i32** %P3
|
|
ret void
|
|
}
|
|
|
|
@T2a = internal constant i32 224
|
|
@T2b = internal addrspace(30) constant i32 224
|
|
|
|
; CHECK: @T2a
|
|
; CHECK: @T2b
|
|
|
|
define void @test2(i32** %P1, i32 addrspace(30)** %P2) {
|
|
store i32* @T2a, i32** %P1
|
|
store i32 addrspace(30)* @T2b, i32 addrspace(30)** %P2
|
|
ret void
|
|
}
|