• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5
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
8
9; This can be improved; see PR39952.
10
11define void @func() nounwind ssp {
12; I386-LABEL: func:
13; I386:       ## %bb.0: ## %entry
14; I386-NEXT:    subl $32, %esp
15; I386-NEXT:    .p2align 4, 0x90
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
27;
28; CORE2-LABEL: func:
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, 0x90
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
42;
43; COREI7-LABEL: func:
44; COREI7:       ## %bb.0: ## %entry
45; COREI7-NEXT:    movups _.str3+{{.*}}(%rip), %xmm0
46; COREI7-NEXT:    movups {{.*}}(%rip), %xmm1
47; COREI7-NEXT:    .p2align 4, 0x90
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
53entry:
54  %String2Loc = alloca [31 x i8], align 1
55  br label %bb
56
57bb:                                               ; preds = %bb, %entry
58  %String2Loc9 = getelementptr inbounds [31 x i8], [31 x i8]* %String2Loc, i64 0, i64 0
59  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %String2Loc9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str3, i64 0, i64 0), i64 31, i1 false)
60  br label %bb
61
62return:                                           ; No predecessors!
63  ret void
64}
65
66define void @func_aligned() nounwind ssp {
67; I386-LABEL: func_aligned:
68; I386:       ## %bb.0: ## %entry
69; I386-NEXT:    subl $44, %esp
70; I386-NEXT:    movaps {{.*#+}} xmm0 = [1498564676,1313821779,1380982853,1095911247]
71; I386-NEXT:    .p2align 4, 0x90
72; I386-NEXT:  LBB1_1: ## %bb
73; I386-NEXT:    ## =>This Inner Loop Header: Depth=1
74; I386-NEXT:    movaps %xmm0, (%esp)
75; I386-NEXT:    movl $4673097, {{[0-9]+}}(%esp) ## imm = 0x474E49
76; I386-NEXT:    movl $1230132307, {{[0-9]+}}(%esp) ## imm = 0x49525453
77; I386-NEXT:    movl $541347367, {{[0-9]+}}(%esp) ## imm = 0x20444E27
78; I386-NEXT:    movl $840969293, {{[0-9]+}}(%esp) ## imm = 0x32202C4D
79; I386-NEXT:    jmp LBB1_1
80;
81; CORE2-LABEL: func_aligned:
82; CORE2:       ## %bb.0: ## %entry
83; CORE2-NEXT:    movabsq $20070800167293728, %rax ## imm = 0x474E4952545320
84; CORE2-NEXT:    movabsq $2325069237881678925, %rcx ## imm = 0x20444E2732202C4D
85; CORE2-NEXT:    movabsq $4706902966564560965, %rdx ## imm = 0x4152474F52502045
86; CORE2-NEXT:    movabsq $5642821575076104260, %rsi ## imm = 0x4E4F545359524844
87; CORE2-NEXT:    .p2align 4, 0x90
88; CORE2-NEXT:  LBB1_1: ## %bb
89; CORE2-NEXT:    ## =>This Inner Loop Header: Depth=1
90; CORE2-NEXT:    movq %rax, -{{[0-9]+}}(%rsp)
91; CORE2-NEXT:    movq %rcx, -{{[0-9]+}}(%rsp)
92; CORE2-NEXT:    movq %rdx, -{{[0-9]+}}(%rsp)
93; CORE2-NEXT:    movq %rsi, -{{[0-9]+}}(%rsp)
94; CORE2-NEXT:    jmp LBB1_1
95;
96; COREI7-LABEL: func_aligned:
97; COREI7:       ## %bb.0: ## %entry
98; COREI7-NEXT:    movups _.str3+{{.*}}(%rip), %xmm0
99; COREI7-NEXT:    movups {{.*}}(%rip), %xmm1
100; COREI7-NEXT:    .p2align 4, 0x90
101; COREI7-NEXT:  LBB1_1: ## %bb
102; COREI7-NEXT:    ## =>This Inner Loop Header: Depth=1
103; COREI7-NEXT:    movups %xmm0, -{{[0-9]+}}(%rsp)
104; COREI7-NEXT:    movaps %xmm1, -{{[0-9]+}}(%rsp)
105; COREI7-NEXT:    jmp LBB1_1
106entry:
107  %String2Loc = alloca [31 x i8], align 16
108  br label %bb
109
110bb:                                               ; preds = %bb, %entry
111  %String2Loc9 = getelementptr inbounds [31 x i8], [31 x i8]* %String2Loc, i64 0, i64 0
112  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %String2Loc9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str3, i64 0, i64 0), i64 31, i1 false)
113  br label %bb
114
115return:                                           ; No predecessors!
116  ret void
117}
118
119declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
120