1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic | FileCheck -check-prefix=I386 %s
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=core2 -relocation-model=dynamic-no-pic | FileCheck -check-prefix=CORE2 %s
4 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -mcpu=corei7 -relocation-model=dynamic-no-pic | FileCheck -check-prefix=COREI7 %s
6 @.str1 = internal constant [31 x i8] c"DHRYSTONE PROGRAM, SOME STRING\00", align 8
7 @.str3 = internal constant [31 x i8] c"DHRYSTONE PROGRAM, 2'ND STRING\00", align 8
9 ; This can be improved; see PR39952.
11 define void @func() nounwind ssp {
13 ; I386: ## %bb.0: ## %entry
14 ; I386-NEXT: subl $32, %esp
15 ; I386-NEXT: .p2align 4
16 ; I386-NEXT: LBB0_1: ## %bb
17 ; I386-NEXT: ## =>This Inner Loop Header: Depth=1
18 ; I386-NEXT: movl $4673097, {{[0-9]+}}(%esp) ## imm = 0x474E49
19 ; I386-NEXT: movl $1230132307, {{[0-9]+}}(%esp) ## imm = 0x49525453
20 ; I386-NEXT: movl $541347367, {{[0-9]+}}(%esp) ## imm = 0x20444E27
21 ; I386-NEXT: movl $840969293, {{[0-9]+}}(%esp) ## imm = 0x32202C4D
22 ; I386-NEXT: movl $1095911247, {{[0-9]+}}(%esp) ## imm = 0x4152474F
23 ; I386-NEXT: movl $1380982853, {{[0-9]+}}(%esp) ## imm = 0x52502045
24 ; I386-NEXT: movl $1313821779, {{[0-9]+}}(%esp) ## imm = 0x4E4F5453
25 ; I386-NEXT: movl $1498564676, (%esp) ## imm = 0x59524844
26 ; I386-NEXT: jmp LBB0_1
29 ; CORE2: ## %bb.0: ## %entry
30 ; CORE2-NEXT: movabsq $20070800167293728, %rax ## imm = 0x474E4952545320
31 ; CORE2-NEXT: movabsq $2325069237881678925, %rcx ## imm = 0x20444E2732202C4D
32 ; CORE2-NEXT: movabsq $4706902966564560965, %rdx ## imm = 0x4152474F52502045
33 ; CORE2-NEXT: movabsq $5642821575076104260, %rsi ## imm = 0x4E4F545359524844
34 ; CORE2-NEXT: .p2align 4
35 ; CORE2-NEXT: LBB0_1: ## %bb
36 ; CORE2-NEXT: ## =>This Inner Loop Header: Depth=1
37 ; CORE2-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
38 ; CORE2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
39 ; CORE2-NEXT: movq %rdx, -{{[0-9]+}}(%rsp)
40 ; CORE2-NEXT: movq %rsi, -{{[0-9]+}}(%rsp)
41 ; CORE2-NEXT: jmp LBB0_1
44 ; COREI7: ## %bb.0: ## %entry
45 ; COREI7-NEXT: movups _.str3+15(%rip), %xmm0
46 ; COREI7-NEXT: movups _.str3(%rip), %xmm1
47 ; COREI7-NEXT: .p2align 4
48 ; COREI7-NEXT: LBB0_1: ## %bb
49 ; COREI7-NEXT: ## =>This Inner Loop Header: Depth=1
50 ; COREI7-NEXT: movups %xmm0, -{{[0-9]+}}(%rsp)
51 ; COREI7-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)
52 ; COREI7-NEXT: jmp LBB0_1
54 %String2Loc = alloca [31 x i8], align 1
57 bb: ; preds = %bb, %entry
58 call void @llvm.memcpy.p0.p0.i64(ptr %String2Loc, ptr @.str3, i64 31, i1 false)
61 return: ; No predecessors!
65 define void @func_aligned() nounwind ssp {
66 ; I386-LABEL: func_aligned:
67 ; I386: ## %bb.0: ## %entry
68 ; I386-NEXT: subl $44, %esp
69 ; I386-NEXT: movaps {{.*#+}} xmm0 = [1498564676,1313821779,1380982853,1095911247]
70 ; I386-NEXT: .p2align 4
71 ; I386-NEXT: LBB1_1: ## %bb
72 ; I386-NEXT: ## =>This Inner Loop Header: Depth=1
73 ; I386-NEXT: movaps %xmm0, (%esp)
74 ; I386-NEXT: movl $4673097, {{[0-9]+}}(%esp) ## imm = 0x474E49
75 ; I386-NEXT: movl $1230132307, {{[0-9]+}}(%esp) ## imm = 0x49525453
76 ; I386-NEXT: movl $541347367, {{[0-9]+}}(%esp) ## imm = 0x20444E27
77 ; I386-NEXT: movl $840969293, {{[0-9]+}}(%esp) ## imm = 0x32202C4D
78 ; I386-NEXT: jmp LBB1_1
80 ; CORE2-LABEL: func_aligned:
81 ; CORE2: ## %bb.0: ## %entry
82 ; CORE2-NEXT: movabsq $20070800167293728, %rax ## imm = 0x474E4952545320
83 ; CORE2-NEXT: movabsq $2325069237881678925, %rcx ## imm = 0x20444E2732202C4D
84 ; CORE2-NEXT: movabsq $4706902966564560965, %rdx ## imm = 0x4152474F52502045
85 ; CORE2-NEXT: movabsq $5642821575076104260, %rsi ## imm = 0x4E4F545359524844
86 ; CORE2-NEXT: .p2align 4
87 ; CORE2-NEXT: LBB1_1: ## %bb
88 ; CORE2-NEXT: ## =>This Inner Loop Header: Depth=1
89 ; CORE2-NEXT: movq %rax, -{{[0-9]+}}(%rsp)
90 ; CORE2-NEXT: movq %rcx, -{{[0-9]+}}(%rsp)
91 ; CORE2-NEXT: movq %rdx, -{{[0-9]+}}(%rsp)
92 ; CORE2-NEXT: movq %rsi, -{{[0-9]+}}(%rsp)
93 ; CORE2-NEXT: jmp LBB1_1
95 ; COREI7-LABEL: func_aligned:
96 ; COREI7: ## %bb.0: ## %entry
97 ; COREI7-NEXT: movups _.str3+15(%rip), %xmm0
98 ; COREI7-NEXT: movups _.str3(%rip), %xmm1
99 ; COREI7-NEXT: .p2align 4
100 ; COREI7-NEXT: LBB1_1: ## %bb
101 ; COREI7-NEXT: ## =>This Inner Loop Header: Depth=1
102 ; COREI7-NEXT: movups %xmm0, -{{[0-9]+}}(%rsp)
103 ; COREI7-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)
104 ; COREI7-NEXT: jmp LBB1_1
106 %String2Loc = alloca [31 x i8], align 16
109 bb: ; preds = %bb, %entry
110 call void @llvm.memcpy.p0.p0.i64(ptr %String2Loc, ptr @.str3, i64 31, i1 false)
113 return: ; No predecessors!
117 declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind