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

Side by Side Diff: tests_lit/assembler/arm32/vmls.ll

Issue 1642303002: Add the VMLS instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix comment in test. Created 4 years, 10 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 | « src/IceInstARM32.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 ; Show that we can take advantage of the vmla instruction for floating point 1 ; Show that we can take advantage of the vmls instruction for floating point
2 ; operations during optimization. 2 ; operations during optimization.
3 3
4 ; Note that we use -O2 to force the result of the fmul to be (immediately) 4 ; Note that we use -O2 to force the result of the fmul to be
5 ; available for the fadd. When using -Om1, the merge of fmul and fadd does not 5 ; (immediately) available for the fsub. When using -Om1, the merge of
6 ; happen due to intervening register spill code. 6 ; fmul and fsub does not happen.
7 7
8 ; REQUIRES: allow_dump 8 ; REQUIRES: allow_dump
9 9
10 ; Compile using standalone assembler. 10 ; Compile using standalone assembler.
11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \ 11 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -O2 \
12 ; RUN: -reg-use=s20,s21,s22,d20,d21,d22 \ 12 ; RUN: -reg-use=s20,s21,s22,d20,d21,d22 \
13 ; RUN: | FileCheck %s --check-prefix=ASM 13 ; RUN: | FileCheck %s --check-prefix=ASM
14 14
15 ; Show bytes in assembled standalone code. 15 ; Show bytes in assembled standalone code.
16 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ 16 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \
17 ; RUN: --args -O2 -reg-use=s20,s21,s22,d20,d21,d22 \ 17 ; RUN: --args -O2 -reg-use=s20,s21,s22,d20,d21,d22 \
18 ; RUN: | FileCheck %s --check-prefix=DIS 18 ; RUN: | FileCheck %s --check-prefix=DIS
19 19
20 ; Compile using integrated assembler. 20 ; Compile using integrated assembler.
21 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \ 21 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --args -O2 \
22 ; RUN: -reg-use=s20,s21,s22,d20,d21,d22 \ 22 ; RUN: -reg-use=s20,s21,s22,d20,d21,d22 \
23 ; RUN: | FileCheck %s --check-prefix=IASM 23 ; RUN: | FileCheck %s --check-prefix=IASM
24 24
25 ; Show bytes in assembled integrated code. 25 ; Show bytes in assembled integrated code.
26 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ 26 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \
27 ; RUN: --args -O2 -reg-use=s20,s21,s22,d20,d21,d22 \ 27 ; RUN: --args -O2 -reg-use=s20,s21,s22,d20,d21,d22 \
28 ; RUN: | FileCheck %s --check-prefix=DIS 28 ; RUN: | FileCheck %s --check-prefix=DIS
29 29
30 define internal float @mulAddFloat(float %f1, float %f2) { 30 define internal float @mulSubFloat(float %f1, float %f2) {
31 ; ASM-LABEL: mulAddFloat: 31 ; ASM-LABEL: mulSubFloat:
32 ; DIS-LABEL: 00000000 <mulAddFloat>: 32 ; DIS-LABEL: 00000000 <mulSubFloat>:
33 33
34 %v1 = fmul float %f1, 1.5 34 %v1 = fmul float %f1, 1.5
35 %v2 = fadd float %f2, %v1 35 %v2 = fsub float %f2, %v1
36 36
37 ; ASM: vmla.f32 s21, s20, s22 37 ; ASM: vmls.f32 s21, s20, s22
38 ; DIS: 10: ee4aaa0b 38 ; DIS: 10: ee4aaa4b
39 ; IASM-NOT: vmla 39 ; IASM-NOT: vmls.f32
40 40
41 ret float %v2 41 ret float %v2
42 } 42 }
43 43
44 define internal double @mulAddDouble(double %f1, double %f2) { 44 define internal double @mulSubDouble(double %f1, double %f2) {
45 ; ASM-LABEL: mulAddDouble: 45 ; ASM-LABEL: mulSubDouble:
46 ; DIS-LABEL: 00000020 <mulAddDouble>: 46 ; DIS-LABEL: 00000020 <mulSubDouble>:
47 47
48 %v1 = fmul double %f1, 1.5 48 %v1 = fmul double %f1, 1.5
49 %v2 = fadd double %f2, %v1 49 %v2 = fsub double %f2, %v1
50 50
51 ; ASM: vmla.f64 d21, d20, d22 51 ; ASM: vmls.f64 d21, d20, d22
52 ; DIS: 2c: ee445ba6 52 ; DIS: 2c: ee445be6
53 ; IASM-NOT: vmla 53 ; IASM-NOT: vmls.f64
54 54
55 ret double %v2 55 ret double %v2
56 } 56 }
OLDNEW
« no previous file with comments | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698