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

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

Issue 647223004: emitIAS for movsx and movzx. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: format 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 | « tests_lit/llvm2ice_tests/convert.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Tests various aspects of i1 related lowering. 1 ; Tests various aspects of i1 related lowering.
2 2
3 ; RUN: %p2i -i %s -a -O2 --verbose none \ 3 ; RUN: %p2i -i %s -a -O2 --verbose none \
4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 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 5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
6 ; RUN: %p2i -i %s -a -Om1 --verbose none \ 6 ; RUN: %p2i -i %s -a -Om1 --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 -a --verbose none | FileCheck --check-prefix=ERRORS %s 9 ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s
10 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s 10 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 entry: 72 entry:
73 %arg_i1 = trunc i32 %arg to i1 73 %arg_i1 = trunc i32 %arg to i1
74 %result_i16 = zext i1 %arg_i1 to i16 74 %result_i16 = zext i1 %arg_i1 to i16
75 %result = zext i16 %result_i16 to i32 75 %result = zext i16 %result_i16 to i32
76 ret i32 %result 76 ret i32 %result
77 } 77 }
78 ; CHECK-LABEL: testZextI16 78 ; CHECK-LABEL: testZextI16
79 ; match the trunc instruction 79 ; match the trunc instruction
80 ; CHECK: and {{.*}}, 1 80 ; CHECK: and {{.*}}, 1
81 ; match the zext i1 instruction 81 ; match the zext i1 instruction
82 ; CHECK: movzx 82 ; CHECK: movzx [[REG:.*]], {{[a-d]l|byte ptr}}
Jim Stichnoth 2014/10/15 20:08:45 Should this be something like [[REG:e.*]] to indic
jvoung (off chromium) 2014/10/15 21:07:29 Hmm, yes it's a bit puzzling. Thinking about it m
83 ; CHECK: and {{.*}}, 1 83 ; CHECK: and [[REG]], 1
84 84
85 ; Test zext to i32. 85 ; Test zext to i32.
86 define internal i32 @testZextI32(i32 %arg) { 86 define internal i32 @testZextI32(i32 %arg) {
87 entry: 87 entry:
88 %arg_i1 = trunc i32 %arg to i1 88 %arg_i1 = trunc i32 %arg to i1
89 %result_i32 = zext i1 %arg_i1 to i32 89 %result_i32 = zext i1 %arg_i1 to i32
90 ret i32 %result_i32 90 ret i32 %result_i32
91 } 91 }
92 ; CHECK-LABEL: testZextI32 92 ; CHECK-LABEL: testZextI32
93 ; match the trunc instruction 93 ; match the trunc instruction
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 entry: 131 entry:
132 %arg_i1 = trunc i32 %arg to i1 132 %arg_i1 = trunc i32 %arg to i1
133 %result_i16 = sext i1 %arg_i1 to i16 133 %result_i16 = sext i1 %arg_i1 to i16
134 %result = sext i16 %result_i16 to i32 134 %result = sext i16 %result_i16 to i32
135 ret i32 %result 135 ret i32 %result
136 } 136 }
137 ; CHECK-LABEL: testSextI16 137 ; CHECK-LABEL: testSextI16
138 ; match the trunc instruction 138 ; match the trunc instruction
139 ; CHECK: and {{.*}}, 1 139 ; CHECK: and {{.*}}, 1
140 ; match the sext i1 instruction 140 ; match the sext i1 instruction
141 ; CHECK: movzx [[REG:.*]], 141 ; CHECK: movzx e[[REG:.*]], {{[a-d]l|byte ptr}}
142 ; CHECK-NEXT: shl [[REG]], 15 142 ; CHECK-NEXT: shl [[REG]], 15
143 ; CHECK-NEXT: sar [[REG]], 15 143 ; CHECK-NEXT: sar [[REG]], 15
144 144
145 ; Test sext to i32. 145 ; Test sext to i32.
146 define internal i32 @testSextI32(i32 %arg) { 146 define internal i32 @testSextI32(i32 %arg) {
147 entry: 147 entry:
148 %arg_i1 = trunc i32 %arg to i1 148 %arg_i1 = trunc i32 %arg to i1
149 %result_i32 = sext i1 %arg_i1 to i32 149 %result_i32 = sext i1 %arg_i1 to i32
150 ret i32 %result_i32 150 ret i32 %result_i32
151 } 151 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 ; CHECK-LABEL: testFptosiDouble 196 ; CHECK-LABEL: testFptosiDouble
197 ; CHECK: cvttsd2si 197 ; CHECK: cvttsd2si
198 ; CHECK: and {{.*}}, 1 198 ; CHECK: and {{.*}}, 1
199 ; CHECK: movzx [[REG:.*]], 199 ; CHECK: movzx [[REG:.*]],
200 ; CHECK-NEXT: shl [[REG]], 31 200 ; CHECK-NEXT: shl [[REG]], 31
201 ; CHECK-NEXT: sar [[REG]], 31 201 ; CHECK-NEXT: sar [[REG]], 31
202 202
203 ; ERRORS-NOT: ICE translation error 203 ; ERRORS-NOT: ICE translation error
204 ; DUMP-NOT: SZ 204 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/convert.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698