2009-09-09 02:09:15 +02:00
|
|
|
; RUN: llc < %s -march=xcore -mcpu=xs1b-generic | FileCheck %s
|
2009-07-24 02:38:20 +02:00
|
|
|
|
|
|
|
define i32 *@addr_G1() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G1:
|
2009-07-24 02:38:20 +02:00
|
|
|
; CHECK: ldaw r0, dp[G1]
|
|
|
|
ret i32* @G1
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 *@addr_G2() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G2:
|
2009-07-24 02:38:20 +02:00
|
|
|
; CHECK: ldaw r0, dp[G2]
|
|
|
|
ret i32* @G2
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 *@addr_G3() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G3:
|
2014-02-11 11:36:26 +01:00
|
|
|
; CHECK: ldaw r0, dp[G3]
|
2009-07-24 02:38:20 +02:00
|
|
|
ret i32* @G3
|
|
|
|
}
|
|
|
|
|
2014-02-11 11:36:26 +01:00
|
|
|
define i32 *@addr_iG3() {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: addr_iG3:
|
|
|
|
; CHECK: ldaw r11, cp[iG3]
|
|
|
|
; CHECK: mov r0, r11
|
|
|
|
ret i32* @iG3
|
|
|
|
}
|
|
|
|
|
2009-08-18 19:58:17 +02:00
|
|
|
define i32 **@addr_G4() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G4:
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: ldaw r0, dp[G4]
|
|
|
|
ret i32** @G4
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 **@addr_G5() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G5:
|
2014-02-11 11:36:26 +01:00
|
|
|
; CHECK: ldaw r0, dp[G5]
|
2009-08-18 19:58:17 +02:00
|
|
|
ret i32** @G5
|
|
|
|
}
|
|
|
|
|
2014-02-11 11:36:26 +01:00
|
|
|
define i32 **@addr_iG5() {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: addr_iG5:
|
|
|
|
; CHECK: ldaw r11, cp[iG5]
|
|
|
|
; CHECK: mov r0, r11
|
|
|
|
ret i32** @iG5
|
|
|
|
}
|
|
|
|
|
2009-08-18 19:58:17 +02:00
|
|
|
define i32 **@addr_G6() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G6:
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: ldaw r0, dp[G6]
|
|
|
|
ret i32** @G6
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 **@addr_G7() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G7:
|
2014-02-11 11:36:26 +01:00
|
|
|
; CHECK: ldaw r0, dp[G7]
|
2009-08-18 19:58:17 +02:00
|
|
|
ret i32** @G7
|
|
|
|
}
|
|
|
|
|
2014-02-11 11:36:26 +01:00
|
|
|
define i32 **@addr_iG7() {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: addr_iG7:
|
|
|
|
; CHECK: ldaw r11, cp[iG7]
|
|
|
|
; CHECK: mov r0, r11
|
|
|
|
ret i32** @iG7
|
|
|
|
}
|
|
|
|
|
2009-08-18 19:58:17 +02:00
|
|
|
define i32 *@addr_G8() {
|
|
|
|
entry:
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: addr_G8:
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: ldaw r0, dp[G8]
|
|
|
|
ret i32* @G8
|
|
|
|
}
|
|
|
|
|
2009-07-24 02:38:20 +02:00
|
|
|
@G1 = global i32 4712
|
2011-03-04 21:03:14 +01:00
|
|
|
; CHECK: .section .dp.data,"awd",@progbits
|
2009-07-24 02:38:20 +02:00
|
|
|
; CHECK: G1:
|
|
|
|
|
|
|
|
@G2 = global i32 0
|
2011-03-04 21:03:14 +01:00
|
|
|
; CHECK: .section .dp.bss,"awd",@nobits
|
2009-07-24 02:38:20 +02:00
|
|
|
; CHECK: G2:
|
|
|
|
|
2011-01-16 19:02:57 +01:00
|
|
|
@G3 = unnamed_addr constant i32 9401
|
2014-02-11 11:36:26 +01:00
|
|
|
; CHECK: .section .dp.rodata,"awd",@progbits
|
2009-07-24 02:38:20 +02:00
|
|
|
; CHECK: G3:
|
|
|
|
|
2014-02-11 11:36:26 +01:00
|
|
|
@iG3 = internal constant i32 9401
|
|
|
|
; CHECK: .section .cp.rodata,"ac",@progbits
|
|
|
|
; CHECK: iG3:
|
|
|
|
|
2009-08-18 19:58:17 +02:00
|
|
|
@G4 = global i32* @G1
|
2011-03-04 21:03:14 +01:00
|
|
|
; CHECK: .section .dp.data,"awd",@progbits
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: G4:
|
|
|
|
|
2011-01-16 19:02:57 +01:00
|
|
|
@G5 = unnamed_addr constant i32* @G1
|
2014-02-11 11:36:26 +01:00
|
|
|
; CHECK: .section .dp.rodata,"awd",@progbits
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: G5:
|
|
|
|
|
2014-02-11 11:36:26 +01:00
|
|
|
@iG5 = internal unnamed_addr constant i32* @G1
|
|
|
|
; CHECK: .section .cp.rodata,"ac",@progbits
|
|
|
|
; CHECK: iG5:
|
|
|
|
|
2009-08-18 19:58:17 +02:00
|
|
|
@G6 = global i32* @G8
|
2011-03-04 21:03:14 +01:00
|
|
|
; CHECK: .section .dp.data,"awd",@progbits
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: G6:
|
|
|
|
|
2011-01-16 19:02:57 +01:00
|
|
|
@G7 = unnamed_addr constant i32* @G8
|
2014-02-11 11:36:26 +01:00
|
|
|
; CHECK: .section .dp.rodata,"awd",@progbits
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: G7:
|
|
|
|
|
2014-02-11 11:36:26 +01:00
|
|
|
@iG7 = internal unnamed_addr constant i32* @G8
|
|
|
|
; CHECK: .section .cp.rodata,"ac",@progbits
|
|
|
|
; CHECK: iG7:
|
|
|
|
|
|
|
|
@G8 = global i32 9312
|
2011-03-04 21:03:14 +01:00
|
|
|
; CHECK: .section .dp.data,"awd",@progbits
|
2009-08-18 19:58:17 +02:00
|
|
|
; CHECK: G8:
|
2013-08-01 09:52:05 +02:00
|
|
|
|
|
|
|
@array = global [10 x i16] zeroinitializer, align 2
|
|
|
|
; CHECK: .globl array.globound
|
2013-10-11 12:27:13 +02:00
|
|
|
; CHECK: array.globound = 10
|