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

Side by Side Diff: tests_lit/llvm2ice_tests/convert.ll

Issue 649463002: Handle "Mov" which is mov, movss, movsd, and used for nacl.read.tp. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: bounds check 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
OLDNEW
1 ; Simple test of signed and unsigned integer conversions. 1 ; Simple test of signed and unsigned integer conversions.
2 2
3 ; TODO(jvoung): llvm-objdump doesn't symbolize global symbols well, so we 3 ; TODO(jvoung): llvm-objdump doesn't symbolize global symbols well, so we
4 ; have [0] == i8v, [2] == i16v, [4] == i32v, [8] == i64v, etc. 4 ; have [0] == i8v, [2] == i16v, [4] == i32v, [8] == i64v, etc.
5 5
6 ; RUN: %p2i -i %s --args -O2 --verbose none \ 6 ; RUN: %p2i -i %s --args -O2 --verbose none \
7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 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 8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
9 ; RUN: %p2i -i %s --args -Om1 --verbose none \ 9 ; RUN: %p2i -i %s --args -Om1 --verbose none \
10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
(...skipping 25 matching lines...) Expand all
36 ret void 36 ret void
37 } 37 }
38 ; CHECK-LABEL: from_int8 38 ; CHECK-LABEL: from_int8
39 ; CHECK: mov {{.*}}, byte ptr [ 39 ; CHECK: mov {{.*}}, byte ptr [
40 ; CHECK: movsx 40 ; CHECK: movsx
41 ; CHECK: mov word ptr [ 41 ; CHECK: mov word ptr [
42 ; CHECK: movsx 42 ; CHECK: movsx
43 ; CHECK: mov dword ptr [ 43 ; CHECK: mov dword ptr [
44 ; CHECK: movsx 44 ; CHECK: movsx
45 ; CHECK: sar {{.*}}, 31 45 ; CHECK: sar {{.*}}, 31
46 ; CHECK: [8] 46 ; This appears to be a bug in llvm-mc. It should be [8] and [12] to represent
47 ; i64v and i64+4.
jvoung (off chromium) 2014/10/10 00:55:49 I'll see if this is fixed by adding Store::emitIAS
48 ; CHECK-DAG: [8]
49 ; CHECK-DAG: [8]
47 50
48 define void @from_int16() { 51 define void @from_int16() {
49 entry: 52 entry:
50 %__0 = bitcast [2 x i8]* @i16v to i16* 53 %__0 = bitcast [2 x i8]* @i16v to i16*
51 %v0 = load i16* %__0, align 1 54 %v0 = load i16* %__0, align 1
52 %v1 = trunc i16 %v0 to i8 55 %v1 = trunc i16 %v0 to i8
53 %__3 = bitcast [1 x i8]* @i8v to i8* 56 %__3 = bitcast [1 x i8]* @i8v to i8*
54 store i8 %v1, i8* %__3, align 1 57 store i8 %v1, i8* %__3, align 1
55 %v2 = sext i16 %v0 to i32 58 %v2 = sext i16 %v0 to i32
56 %__5 = bitcast [4 x i8]* @i32v to i32* 59 %__5 = bitcast [4 x i8]* @i32v to i32*
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 store i32 %v3, i32* %__7, align 1 202 store i32 %v3, i32* %__7, align 1
200 ret void 203 ret void
201 } 204 }
202 ; CHECK-LABEL: from_uint64 205 ; CHECK-LABEL: from_uint64
203 ; CHECK: [24] 206 ; CHECK: [24]
204 ; CHECK: [0] 207 ; CHECK: [0]
205 ; CHECK: [2] 208 ; CHECK: [2]
206 ; CHECK: [4] 209 ; CHECK: [4]
207 210
208 ; ERRORS-NOT: ICE translation error 211 ; ERRORS-NOT: ICE translation error
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698