mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
f847ccb87a
This commit is to improve global merge pass and support global symbol merge. The global symbol merge is not enabled by default. For aarch64, we need some more back-end fix to make it really benifit ADRP CSE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210640 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
1003 B
LLVM
23 lines
1003 B
LLVM
; RUN: opt %s -mtriple=aarch64-none-linux-gnu -global-merge -S -o - | FileCheck %s
|
|
; RUN: opt %s -mtriple=aarch64-none-linux-gnu -global-merge -global-merge-on-external -S -o - | FileCheck %s
|
|
|
|
; RUN: opt %s -mtriple=aarch64-linux-gnuabi -global-merge -S -o - | FileCheck %s
|
|
; RUN: opt %s -mtriple=aarch64-linux-gnuabi -global-merge -global-merge-on-external -S -o - | FileCheck %s
|
|
|
|
; RUN: opt %s -mtriple=aarch64-apple-ios -global-merge -S -o - | FileCheck %s
|
|
; RUN: opt %s -mtriple=aarch64-apple-ios -global-merge -global-merge-on-external -S -o - | FileCheck %s
|
|
|
|
@m = internal global i32 0, align 4
|
|
@n = internal global i32 0, align 4
|
|
|
|
; CHECK: @_MergedGlobals = internal global { i32, i32 } zeroinitializer
|
|
|
|
define void @f1(i32 %a1, i32 %a2) {
|
|
; CHECK-LABEL: @f1
|
|
; CHECK: getelementptr inbounds ({ i32, i32 }* @_MergedGlobals, i32 0, i32 0)
|
|
; CHECK: getelementptr inbounds ({ i32, i32 }* @_MergedGlobals, i32 0, i32 1)
|
|
store i32 %a1, i32* @m, align 4
|
|
store i32 %a2, i32* @n, align 4
|
|
ret void
|
|
}
|