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

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

Issue 1438773004: Subzero. ARM32. Improve constant lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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/bool-folding.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 ; Assembly test for simple arithmetic operations. 1 ; Assembly test for simple arithmetic operations.
2 2
3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
4 ; RUN: --target x8632 -i %s --args -O2 \ 4 ; RUN: --target x8632 -i %s --args -O2 \
5 ; RUN: | %if --need=target_X8632 --command FileCheck %s 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s
6 6
7 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) 7 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented)
8 ; once enough infrastructure is in. Also, switch to --filetype=obj 8 ; once enough infrastructure is in. Also, switch to --filetype=obj
9 ; when possible. 9 ; when possible.
10 ; RUN: %if --need=target_ARM32 --need=allow_dump \ 10 ; RUN: %if --need=target_ARM32 --need=allow_dump \
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ; Check for a valid ARM mul instruction where operands have to be registers. 110 ; Check for a valid ARM mul instruction where operands have to be registers.
111 ; On the other hand x86-32 does allow an immediate. 111 ; On the other hand x86-32 does allow an immediate.
112 define internal i32 @MulImm(i32 %a, i32 %b) { 112 define internal i32 @MulImm(i32 %a, i32 %b) {
113 entry: 113 entry:
114 %mul = mul i32 %a, 99 114 %mul = mul i32 %a, 99
115 ret i32 %mul 115 ret i32 %mul
116 } 116 }
117 ; CHECK-LABEL: MulImm 117 ; CHECK-LABEL: MulImm
118 ; CHECK: imul e{{.*}},e{{.*}},0x63 118 ; CHECK: imul e{{.*}},e{{.*}},0x63
119 ; ARM32-LABEL: MulImm 119 ; ARM32-LABEL: MulImm
120 ; ARM32: mov {{.*}}, #99 120 ; ARM32: movw {{.*}}, #99
121 ; ARM32: mul r{{.*}}, r{{.*}}, r{{.*}} 121 ; ARM32: mul r{{.*}}, r{{.*}}, r{{.*}}
122 ; MIPS32-LABEL: MulImm 122 ; MIPS32-LABEL: MulImm
123 ; MIPS32: mul 123 ; MIPS32: mul
124 124
125 ; Check for a valid addressing mode in the x86-32 mul instruction when 125 ; Check for a valid addressing mode in the x86-32 mul instruction when
126 ; the second source operand is an immediate. 126 ; the second source operand is an immediate.
127 define internal i64 @MulImm64(i64 %a) { 127 define internal i64 @MulImm64(i64 %a) {
128 entry: 128 entry:
129 %mul = mul i64 %a, 99 129 %mul = mul i64 %a, 99
130 ret i64 %mul 130 ret i64 %mul
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ; CHECK: shr {{.*}},cl 270 ; CHECK: shr {{.*}},cl
271 271
272 define internal i32 @AshrReloc(i32 %a) { 272 define internal i32 @AshrReloc(i32 %a) {
273 entry: 273 entry:
274 %opnd = ptrtoint [4 x i8]* @G to i32 274 %opnd = ptrtoint [4 x i8]* @G to i32
275 %result = ashr i32 %a, %opnd 275 %result = ashr i32 %a, %opnd
276 ret i32 %result 276 ret i32 %result
277 } 277 }
278 ; CHECK-LABEL: AshrReloc 278 ; CHECK-LABEL: AshrReloc
279 ; CHECK: sar {{.*}},cl 279 ; CHECK: sar {{.*}},cl
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/64bit.pnacl.ll ('k') | tests_lit/llvm2ice_tests/bool-folding.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698