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

Side by Side Diff: tests_lit/assembler/x86/opcode_register_encodings.ll

Issue 624263002: emitIAS for icmp, and test, movss-reg, movq, movups, storep, storeq, tighten some of the Xmm ops (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: stuff 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 ; Tests various aspects of x86 opcode encodings. E.g., some opcodes like 1 ; Tests various aspects of x86 opcode encodings. E.g., some opcodes like
2 ; those for pmull vary more wildly depending on operand size (rather than 2 ; those for pmull vary more wildly depending on operand size (rather than
3 ; follow a usual pattern). 3 ; follow a usual pattern).
4 4
5 ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \ 5 ; RUN: %p2i -i %s --args -O2 -mattr=sse4.1 --verbose none \
6 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 6 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
8 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s 8 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s
9 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
10 9
11 define <8 x i16> @test_mul_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) { 10 define <8 x i16> @test_mul_v8i16(<8 x i16> %arg0, <8 x i16> %arg1) {
12 entry: 11 entry:
13 %res = mul <8 x i16> %arg0, %arg1 12 %res = mul <8 x i16> %arg0, %arg1
14 ret <8 x i16> %res 13 ret <8 x i16> %res
15 ; CHECK-LABEL: test_mul_v8i16 14 ; CHECK-LABEL: test_mul_v8i16
16 ; CHECK: 66 0f d5 c1 pmullw xmm0, xmm1 15 ; CHECK: 66 0f d5 c1 pmullw xmm0, xmm1
17 } 16 }
18 17
19 ; Test register and address mode encoding. 18 ; Test register and address mode encoding.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ; CHECK-DAG: 66 0f 38 40 c2 pmulld xmm0, xmm2 75 ; CHECK-DAG: 66 0f 38 40 c2 pmulld xmm0, xmm2
77 ; CHECK-DAG: 66 0f 38 40 c3 pmulld xmm0, xmm3 76 ; CHECK-DAG: 66 0f 38 40 c3 pmulld xmm0, xmm3
78 ; CHECK-DAG: 66 0f 38 40 c4 pmulld xmm0, xmm4 77 ; CHECK-DAG: 66 0f 38 40 c4 pmulld xmm0, xmm4
79 ; CHECK-DAG: 66 0f 38 40 c5 pmulld xmm0, xmm5 78 ; CHECK-DAG: 66 0f 38 40 c5 pmulld xmm0, xmm5
80 ; CHECK-DAG: 66 0f 38 40 c6 pmulld xmm0, xmm6 79 ; CHECK-DAG: 66 0f 38 40 c6 pmulld xmm0, xmm6
81 ; CHECK-DAG: 66 0f 38 40 c7 pmulld xmm0, xmm7 80 ; CHECK-DAG: 66 0f 38 40 c7 pmulld xmm0, xmm7
82 ; CHECK-DAG: 66 0f 38 40 44 24 70 pmulld xmm0, xmmword ptr [esp + 112] 81 ; CHECK-DAG: 66 0f 38 40 44 24 70 pmulld xmm0, xmmword ptr [esp + 112]
83 ; CHECK-DAG: 66 0f 38 40 8c 24 80 00 00 00 pmulld xmm1, xmmword ptr [esp + 128] 82 ; CHECK-DAG: 66 0f 38 40 8c 24 80 00 00 00 pmulld xmm1, xmmword ptr [esp + 128]
84 } 83 }
85 84
85 ; Test movq, which is used by atomic stores.
86 declare void @llvm.nacl.atomic.store.i64(i64, i64*, i32)
87
88 define void @test_atomic_store_64(i32 %iptr, i32 %iptr2, i32 %iptr3, i64 %v) {
89 entry:
90 %ptr = inttoptr i32 %iptr to i64*
91 %ptr2 = inttoptr i32 %iptr2 to i64*
92 %ptr3 = inttoptr i32 %iptr3 to i64*
93 call void @llvm.nacl.atomic.store.i64(i64 %v, i64* %ptr2, i32 6)
94 call void @llvm.nacl.atomic.store.i64(i64 1234567891024, i64* %ptr, i32 6)
95 call void @llvm.nacl.atomic.store.i64(i64 %v, i64* %ptr3, i32 6)
96 ret void
97 }
98 ; CHECK-LABEL: test_atomic_store_64
99 ; CHECK-DAG: f3 0f 7e 04 24 movq xmm0, qword ptr [esp]
100 ; CHECK-DAG: f3 0f 7e 44 24 08 movq xmm0, qword ptr [esp + 8]
101 ; CHECK-DAG: 66 0f d6 0{{.*}} movq qword ptr [e{{.*}}], xmm0
102
103 ; Test "movups" via vector stores and loads.
104 define void @store_v16xI8(i32 %addr, i32 %addr2, i32 %addr3, <16 x i8> %v) {
105 %addr_v16xI8 = inttoptr i32 %addr to <16 x i8>*
106 %addr2_v16xI8 = inttoptr i32 %addr2 to <16 x i8>*
107 %addr3_v16xI8 = inttoptr i32 %addr3 to <16 x i8>*
108 store <16 x i8> %v, <16 x i8>* %addr2_v16xI8, align 1
109 store <16 x i8> %v, <16 x i8>* %addr_v16xI8, align 1
110 store <16 x i8> %v, <16 x i8>* %addr3_v16xI8, align 1
111 ret void
112 }
113 ; CHECK-LABEL: store_v16xI8
114 ; CHECK: 0f 11 0{{.*}} movups xmmword ptr [e{{.*}}], xmm0
115
116 define <16 x i8> @load_v16xI8(i32 %addr, i32 %addr2, i32 %addr3) {
117 %addr_v16xI8 = inttoptr i32 %addr to <16 x i8>*
118 %addr2_v16xI8 = inttoptr i32 %addr2 to <16 x i8>*
119 %addr3_v16xI8 = inttoptr i32 %addr3 to <16 x i8>*
120 %res1 = load <16 x i8>* %addr2_v16xI8, align 1
121 %res2 = load <16 x i8>* %addr_v16xI8, align 1
122 %res3 = load <16 x i8>* %addr3_v16xI8, align 1
123 %res12 = add <16 x i8> %res1, %res2
124 %res123 = add <16 x i8> %res12, %res3
125 ret <16 x i8> %res123
126 }
127 ; CHECK-LABEL: load_v16xI8
128 ; CHECK: 0f 10 0{{.*}} movups xmm0, xmmword ptr [e{{.*}}]
129
86 ; ERRORS-NOT: ICE translation error 130 ; ERRORS-NOT: ICE translation error
87 ; DUMP-NOT: SZ
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698