brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · 6b76bb6 Raw
147 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52;RUN: llc -mtriple=x86_64-windows-msvc %s -o - | FileCheck %s3;Test that global variables and functions are assigned to correct sections.4 5@a = global i32 0, align 4 #06@b = global i32 1, align 4 #07@c = global [4 x i32] zeroinitializer, align 4 #08@d = global [5 x i16] zeroinitializer, align 2 #09@e = global [6 x i16] [i16 0, i16 0, i16 1, i16 0, i16 0, i16 0], align 2 #010@f = constant i32 2, align 4 #011@h = global i32 0, align 4 #112@i = global i32 0, align 4 #213@j = constant i32 4, align 4 #214@k = global i32 0, align 4 #215@_ZZ3gooE7lstat_h = internal global i32 0, align 4 #216@_ZL1g = internal global [2 x i32] zeroinitializer, align 4 #017@l = global i32 5, align 4 #318@m = constant i32 6, align 4 #319@n = global i32 0, align 420@o = global i32 6, align 421@p = constant i32 7, align 422 23declare i32 @zoo(ptr, ptr) #624 25; Function Attrs: noinline nounwind26define i32 @hoo() #7 {27; CHECK-LABEL: hoo:28; CHECK:       # %bb.0: # %entry29; CHECK-NEXT:    movl b(%rip), %eax30; CHECK-NEXT:    retq31entry:32  %0 = load i32, ptr @b, align 433  ret i32 %034}35 36attributes #0 = { "bss-section"="my_bss.1" "data-section"="my_data.1" "rodata-section"="my_rodata.1" }37attributes #1 = { "data-section"="my_data.1" "rodata-section"="my_rodata.1" }38attributes #2 = { "bss-section"="my_bss.2" "rodata-section"="my_rodata.1" }39attributes #3 = { "bss-section"="my_bss.2" "data-section"="my_data.2" "rodata-section"="my_rodata.2" }40attributes #6 = { "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="preserve-sign,preserve-sign" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "use-soft-float"="false" }41attributes #7 = { noinline nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="preserve-sign,preserve-sign" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="true" "no-jump-tables"="false" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "use-soft-float"="false" }42 43!llvm.module.flags = !{!0, !1, !2, !3}44 45!0 = !{i32 1, !"wchar_size", i32 4}46!1 = !{i32 1, !"static_rwdata", i32 1}47!2 = !{i32 1, !"enumsize_buildattr", i32 2}48!3 = !{i32 1, !"armlib_unavailable", i32 0}49 50;CHECK: 	.section	my_bss.1,"bw"51;CHECK: 	.globl	a                               # @a52;CHECK: 	.p2align	2, 0x053;CHECK: a:54;CHECK: 	.long	0                               # 0x055 56;CHECK: 	.section	my_data.1,"dw"57;CHECK: 	.globl	b                               # @b58;CHECK: 	.p2align	2, 0x059;CHECK: b:60;CHECK: 	.long	1                               # 0x161 62;CHECK: 	.section	my_bss.1,"bw"63;CHECK: 	.globl	c                               # @c64;CHECK: 	.p2align	2, 0x065;CHECK: c:66;CHECK: 	.zero	1667;CHECK: 	.globl	d                               # @d68;CHECK: 	.p2align	1, 0x069;CHECK: d:70;CHECK: 	.zero	1071 72;CHECK: 	.section	my_data.1,"dw"73;CHECK: 	.globl	e                               # @e74;CHECK: 	.p2align	1, 0x075;CHECK: e:76;CHECK: 	.short	0                               # 0x077;CHECK: 	.short	0                               # 0x078;CHECK: 	.short	1                               # 0x179;CHECK: 	.short	0                               # 0x080;CHECK: 	.short	0                               # 0x081;CHECK: 	.short	0                               # 0x082 83;CHECK: 	.section	my_rodata.1,"dr"84;CHECK: 	.globl	f                               # @f85;CHECK: 	.p2align	2, 0x086;CHECK: f:87;CHECK: 	.long	2                               # 0x288;CHECK: 	.bss89;CHECK: 	.globl	h                               # @h90;CHECK: 	.p2align	2, 0x091;CHECK: h:92;CHECK: 	.long	0                               # 0x093 94;CHECK: 	.section	my_bss.2,"bw"95;CHECK: 	.globl	i                               # @i96;CHECK: 	.p2align	2, 0x097;CHECK: i:98;CHECK: 	.long	0                               # 0x099 100;CHECK: 	.section	my_rodata.1,"dr"101;CHECK: 	.globl	j                               # @j102;CHECK: 	.p2align	2, 0x0103;CHECK: j:104;CHECK: 	.long	4                               # 0x4105 106;CHECK: 	.section	my_bss.2,"bw"107;CHECK: 	.globl	k                               # @k108;CHECK: 	.p2align	2, 0x0109;CHECK: k:110;CHECK: 	.long	0                               # 0x0111;CHECK: 	.p2align	2, 0x0                          # @_ZZ3gooE7lstat_h112;CHECK: _ZZ3gooE7lstat_h:113;CHECK: 	.long	0                               # 0x0114 115;CHECK: 	.section	my_bss.1,"bw"116;CHECK: 	.p2align	2, 0x0                          # @_ZL1g117;CHECK: _ZL1g:118;CHECK: 	.zero	8119 120;CHECK: 	.section	my_data.2,"dw"121;CHECK: 	.globl	l                               # @l122;CHECK: 	.p2align	2, 0x0123;CHECK: l:124;CHECK: 	.long	5                               # 0x5125 126;CHECK: 	.section	my_rodata.2,"dr"127;CHECK: 	.globl	m                               # @m128;CHECK: 	.p2align	2, 0x0129;CHECK: m:130;CHECK: 	.long	6                               # 0x6131;CHECK: 	.bss132;CHECK: 	.globl	n                               # @n133;CHECK: 	.p2align	2, 0x0134;CHECK: n:135;CHECK: 	.long	0                               # 0x0136;CHECK: 	.data137;CHECK: 	.globl	o                               # @o138;CHECK: 	.p2align	2, 0x0139;CHECK: o:140;CHECK: 	.long	6                               # 0x6141 142;CHECK: 	.section	.rdata,"dr"143;CHECK: 	.globl	p                               # @p144;CHECK: 	.p2align	2, 0x0145;CHECK: p:146;CHECK: 	.long	7                               # 0x7147