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

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

Issue 547033002: Subzero: Be more strict about i1 calculations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make OPTM1 change similar to CHECK change Created 6 years, 3 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 | « tests_lit/llvm2ice_tests/64bit.pnacl.ll ('k') | tests_lit/llvm2ice_tests/test_i1.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Test sext and zext instructions with i1 source operands.
2
3 ; RUN: %llvm2ice -O2 --verbose none %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 -Om1 --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
9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
11 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
12 ; RUN: | FileCheck --check-prefix=DUMP %s
13
14 define internal i8 @sext1To8(i32 %a) {
15 entry:
16 %a.arg_trunc = trunc i32 %a to i1
17 %conv = sext i1 %a.arg_trunc to i8
18 ret i8 %conv
19 }
20 ; CHECK-LABEL: sext1To8
21 ; CHECK: mov
22 ; CHECK: shl {{.*}}, 7
23 ; CHECK: sar {{.*}}, 7
24
25 define internal i16 @sext1To16(i32 %a) {
26 entry:
27 %a.arg_trunc = trunc i32 %a to i1
28 %conv = sext i1 %a.arg_trunc to i16
29 ret i16 %conv
30 }
31 ; CHECK-LABEL: sext1To16
32 ; CHECK: mov
33 ; CHECK: shl {{.*}}, 15
34 ; CHECK: sar {{.*}}, 15
35
36 define internal i32 @sext1To32(i32 %a) {
37 entry:
38 %a.arg_trunc = trunc i32 %a to i1
39 %conv = sext i1 %a.arg_trunc to i32
40 ret i32 %conv
41 }
42 ; CHECK-LABEL: sext1To32
43 ; CHECK: mov
44 ; CHECK: shl {{.*}}, 31
45 ; CHECK: sar {{.*}}, 31
46
47 define internal i64 @sext1To64(i32 %a) {
48 entry:
49 %a.arg_trunc = trunc i32 %a to i1
50 %conv = sext i1 %a.arg_trunc to i64
51 ret i64 %conv
52 }
53 ; CHECK-LABEL: sext1To64
54 ; CHECK: mov
55 ; CHECK: shl {{.*}}, 31
56 ; CHECK: sar {{.*}}, 31
57 ; CHECK: sar {{.*}}, 31
58
59 define internal i8 @zext1To8(i32 %a) {
60 entry:
61 %a.arg_trunc = trunc i32 %a to i1
62 %conv = zext i1 %a.arg_trunc to i8
63 ret i8 %conv
64 }
65 ; CHECK-LABEL: zext1To8
66 ; CHECK: and {{.*}}, 1
67
68 define internal i16 @zext1To16(i32 %a) {
69 entry:
70 %a.arg_trunc = trunc i32 %a to i1
71 %conv = zext i1 %a.arg_trunc to i16
72 ret i16 %conv
73 }
74 ; CHECK-LABEL: zext1To16
75 ; CHECK: and {{.*}}, 1
76
77 define internal i32 @zext1To32(i32 %a) {
78 entry:
79 %a.arg_trunc = trunc i32 %a to i1
80 %conv = zext i1 %a.arg_trunc to i32
81 ret i32 %conv
82 }
83 ; CHECK-LABEL: zext1To32
84 ; CHECK: and {{.*}}, 1
85
86 define internal i64 @zext1To64(i32 %a) {
87 entry:
88 %a.arg_trunc = trunc i32 %a to i1
89 %conv = zext i1 %a.arg_trunc to i64
90 ret i64 %conv
91 }
92 ; CHECK-LABEL: zext1To64
93 ; CHECK: and {{.*}}, 1
94
95 ; ERRORS-NOT: ICE translation error
96 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/64bit.pnacl.ll ('k') | tests_lit/llvm2ice_tests/test_i1.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698