Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: tests_lit/llvm2ice_tests/align-spill-locations.ll

Issue 574133002: Add initial integrated assembler w/ some Xmm ops. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: remove duplicate pxor, and use enum Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/llvm2ice.cpp ('k') | tests_lit/llvm2ice_tests/ebp_args.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This checks to ensure that Subzero aligns spill slots. 1 ; This checks to ensure that Subzero aligns spill slots.
2 2
3 ; RUN: %llvm2ice --verbose none %s | FileCheck %s 3 ; RUN: %llvm2ice --verbose none %s \
4 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s 4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
6 ; RUN: %llvm2ice -O2 --verbose none %s \
7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
6 10
7 ; The location of the stack slot for a variable is inferred from the 11 ; The location of the stack slot for a variable is inferred from the
8 ; return sequence. 12 ; return sequence.
9 13
10 ; In this file, "global" refers to a variable with a live range across 14 ; In this file, "global" refers to a variable with a live range across
11 ; multiple basic blocks (not an LLVM global variable) and "local" 15 ; multiple basic blocks (not an LLVM global variable) and "local"
12 ; refers to a variable that is live in only a single basic block. 16 ; refers to a variable that is live in only a single basic block.
13 17
14 define <4 x i32> @align_global_vector(i32 %arg) { 18 define <4 x i32> @align_global_vector(i32 %arg) {
(...skipping 26 matching lines...) Expand all
41 45
42 define <4 x i32> @align_global_vector_ebp_based(i32 %arg) { 46 define <4 x i32> @align_global_vector_ebp_based(i32 %arg) {
43 entry: 47 entry:
44 %alloc = alloca i8, i32 1, align 1 48 %alloc = alloca i8, i32 1, align 1
45 %vec.global = insertelement <4 x i32> undef, i32 %arg, i32 0 49 %vec.global = insertelement <4 x i32> undef, i32 %arg, i32 0
46 br label %block 50 br label %block
47 block: 51 block:
48 call void @ForceXmmSpillsAndUseAlloca(i8* %alloc) 52 call void @ForceXmmSpillsAndUseAlloca(i8* %alloc)
49 ret <4 x i32> %vec.global 53 ret <4 x i32> %vec.global
50 ; CHECK-LABEL: align_global_vector_ebp_based: 54 ; CHECK-LABEL: align_global_vector_ebp_based:
51 ; CHECK: movups xmm0, xmmword ptr [ebp-24] 55 ; CHECK: movups xmm0, xmmword ptr [ebp - 24]
52 ; CHECK-NEXT: mov esp, ebp 56 ; CHECK-NEXT: mov esp, ebp
53 ; CHECK-NEXT: pop ebp 57 ; CHECK-NEXT: pop ebp
54 ; CHECK: ret 58 ; CHECK: ret
55 } 59 }
56 60
57 define <4 x i32> @align_local_vector_ebp_based(i32 %arg) { 61 define <4 x i32> @align_local_vector_ebp_based(i32 %arg) {
58 entry: 62 entry:
59 %alloc = alloca i8, i32 1, align 1 63 %alloc = alloca i8, i32 1, align 1
60 %vec.local = insertelement <4 x i32> undef, i32 %arg, i32 0 64 %vec.local = insertelement <4 x i32> undef, i32 %arg, i32 0
61 call void @ForceXmmSpillsAndUseAlloca(i8* %alloc) 65 call void @ForceXmmSpillsAndUseAlloca(i8* %alloc)
62 ret <4 x i32> %vec.local 66 ret <4 x i32> %vec.local
63 ; CHECK-LABEL: align_local_vector_ebp_based: 67 ; CHECK-LABEL: align_local_vector_ebp_based:
64 ; CHECK: movups xmm0, xmmword ptr [ebp-24] 68 ; CHECK: movups xmm0, xmmword ptr [ebp - 24]
65 ; CHECK-NEXT: mov esp, ebp 69 ; CHECK-NEXT: mov esp, ebp
66 ; CHECK-NEXT: pop ebp 70 ; CHECK-NEXT: pop ebp
67 ; CHECK: ret 71 ; CHECK: ret
68 } 72 }
69 73
70 define <4 x i32> @align_local_vector_and_global_float(i32 %arg) { 74 define <4 x i32> @align_local_vector_and_global_float(i32 %arg) {
71 entry: 75 entry:
72 %float.global = sitofp i32 %arg to float 76 %float.global = sitofp i32 %arg to float
73 call void @ForceXmmSpillsAndUseFloat(float %float.global) 77 call void @ForceXmmSpillsAndUseFloat(float %float.global)
74 br label %block 78 br label %block
75 block: 79 block:
76 %vec.local = insertelement <4 x i32> undef, i32 undef, i32 0 80 %vec.local = insertelement <4 x i32> undef, i32 undef, i32 0
77 call void @ForceXmmSpillsAndUseFloat(float %float.global) 81 call void @ForceXmmSpillsAndUseFloat(float %float.global)
78 ret <4 x i32> %vec.local 82 ret <4 x i32> %vec.local
79 ; CHECK-LABEL: align_local_vector_and_global_float: 83 ; CHECK-LABEL: align_local_vector_and_global_float:
80 ; CHECK: cvtsi2ss xmm0, eax 84 ; CHECK: cvtsi2ss xmm0, eax
81 ; CHECK-NEXT: movss dword ptr [esp+{{12|28}}], xmm0 85 ; CHECK-NEXT: movss dword ptr [esp + {{12|28}}], xmm0
82 ; CHECK: movups xmm0, xmmword ptr [{{esp|esp\+16}}] 86 ; CHECK: movups xmm0, xmmword ptr [{{esp|esp \+ 16}}]
83 ; CHECK-NEXT: add esp, 44 87 ; CHECK-NEXT: add esp, 44
84 ; CHECK-NEXT: ret 88 ; CHECK-NEXT: ret
85 } 89 }
86 90
87 declare void @ForceXmmSpillsAndUseAlloca(i8*) 91 declare void @ForceXmmSpillsAndUseAlloca(i8*)
88 declare void @ForceXmmSpillsAndUseFloat(float) 92 declare void @ForceXmmSpillsAndUseFloat(float)
89 93
90 ; ERRORS-NOT: ICE translation error 94 ; ERRORS-NOT: ICE translation error
OLDNEW
« no previous file with comments | « src/llvm2ice.cpp ('k') | tests_lit/llvm2ice_tests/ebp_args.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698