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

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

Issue 1469113003: Subzero. ARM32. Strength reduce multiplications. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years 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 | « src/IceTargetLoweringARM32.cpp ('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 ; 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 \
11 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \ 11 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \
12 ; RUN: -i %s --args -O2 --skip-unimplemented \ 12 ; RUN: -i %s --args -O2 --skip-unimplemented \
13 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ 13 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
14 ; RUN: --command FileCheck --check-prefix ARM32 %s 14 ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM-OPT2 %s
15 ; RUN: %if --need=target_ARM32 --need=allow_dump \ 15 ; RUN: %if --need=target_ARM32 --need=allow_dump \
16 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \ 16 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \
17 ; RUN: -i %s --args -O2 --mattr=hwdiv-arm --skip-unimplemented \ 17 ; RUN: -i %s --args -O2 --mattr=hwdiv-arm --skip-unimplemented \
18 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ 18 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
19 ; RUN: --command FileCheck --check-prefix ARM32HWDIV %s 19 ; RUN: --command FileCheck --check-prefix ARM32HWDIV %s
20 ; RUN: %if --need=target_ARM32 --need=allow_dump \ 20 ; RUN: %if --need=target_ARM32 --need=allow_dump \
21 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \ 21 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target arm32 \
22 ; RUN: -i %s --args -Om1 --skip-unimplemented \ 22 ; RUN: -i %s --args -Om1 --skip-unimplemented \
23 ; RUN: | %if --need=target_ARM32 --need=allow_dump \ 23 ; RUN: | %if --need=target_ARM32 --need=allow_dump \
24 ; RUN: --command FileCheck --check-prefix ARM32 %s 24 ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM32-OPTM1 %s
25 ; 25 ;
26 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ 26 ; RUN: %if --need=target_MIPS32 --need=allow_dump \
27 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target mips32\ 27 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target mips32\
28 ; RUN: -i %s --args -O2 --skip-unimplemented \ 28 ; RUN: -i %s --args -O2 --skip-unimplemented \
29 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ 29 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \
30 ; RUN: --command FileCheck --check-prefix MIPS32 %s 30 ; RUN: --command FileCheck --check-prefix MIPS32 %s
31 31
32 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ 32 ; RUN: %if --need=target_MIPS32 --need=allow_dump \
33 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target mips32\ 33 ; RUN: --command %p2i --filetype=asm --assemble --disassemble --target mips32\
34 ; RUN: -i %s --args -Om1 --skip-unimplemented \ 34 ; RUN: -i %s --args -Om1 --skip-unimplemented \
(...skipping 75 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: movw {{.*}}, #99 120 ; ARM32-OPTM1: movw {{.*}}, #99
121 ; ARM32: mul r{{.*}}, r{{.*}}, r{{.*}} 121 ; ARM32-OPTM1: mul r{{.*}}, r{{.*}}, r{{.*}}
122 ; ARM32-OPT2: rsb [[T:r[0-9]+]], [[S:r[0-9]+]], [[S]], lsl #2
123 ; ARM32-OPT2-DAG: add [[T]], [[T]], [[S]], lsl #7
124 ; ARM32-OPT2-DAG: sub [[T]], [[T]], [[S]], lsl #5
122 ; MIPS32-LABEL: MulImm 125 ; MIPS32-LABEL: MulImm
123 ; MIPS32: mul 126 ; MIPS32: mul
124 127
125 ; Check for a valid addressing mode in the x86-32 mul instruction when 128 ; Check for a valid addressing mode in the x86-32 mul instruction when
126 ; the second source operand is an immediate. 129 ; the second source operand is an immediate.
127 define internal i64 @MulImm64(i64 %a) { 130 define internal i64 @MulImm64(i64 %a) {
128 entry: 131 entry:
129 %mul = mul i64 %a, 99 132 %mul = mul i64 %a, 99
130 ret i64 %mul 133 ret i64 %mul
131 } 134 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ; CHECK: shr {{.*}},cl 273 ; CHECK: shr {{.*}},cl
271 274
272 define internal i32 @AshrReloc(i32 %a) { 275 define internal i32 @AshrReloc(i32 %a) {
273 entry: 276 entry:
274 %opnd = ptrtoint [4 x i8]* @G to i32 277 %opnd = ptrtoint [4 x i8]* @G to i32
275 %result = ashr i32 %a, %opnd 278 %result = ashr i32 %a, %opnd
276 ret i32 %result 279 ret i32 %result
277 } 280 }
278 ; CHECK-LABEL: AshrReloc 281 ; CHECK-LABEL: AshrReloc
279 ; CHECK: sar {{.*}},cl 282 ; CHECK: sar {{.*}},cl
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698