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

Side by Side Diff: tests_lit/assembler/mips32/encoding_intrinsics.ll

Issue 2354293002: Subzero, MIPS32: Intrinsic call Ctlz for i32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressing review comments Created 4 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 | « src/IceTargetLoweringMIPS32.cpp ('k') | tests_lit/llvm2ice_tests/nacl-other-intrinsics.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 ; Test encoding of MIPS32 floating point arithmetic instructions 1 ; Test encoding of MIPS32 instructions used in intrinsic calls
2 2
3 ; REQUIRES: allow_dump 3 ; REQUIRES: allow_dump
4 4
5 ; Compile using standalone assembler. 5 ; Compile using standalone assembler.
6 ; RUN: %p2i --filetype=asm -i %s --target=mips32 --args -O2 \ 6 ; RUN: %p2i --filetype=asm -i %s --target=mips32 --args -O2 \
7 ; RUN: --allow-externally-defined-symbols --skip-unimplemented \ 7 ; RUN: --allow-externally-defined-symbols --skip-unimplemented \
8 ; RUN: | FileCheck %s --check-prefix=ASM 8 ; RUN: | FileCheck %s --check-prefix=ASM
9 9
10 ; Show bytes in assembled standalone code. 10 ; Show bytes in assembled standalone code.
11 ; RUN: %p2i --filetype=asm -i %s --target=mips32 --assemble --disassemble \ 11 ; RUN: %p2i --filetype=asm -i %s --target=mips32 --assemble --disassemble \
12 ; RUN: --args -O2 --allow-externally-defined-symbols --skip-unimplemented \ 12 ; RUN: --args -O2 --allow-externally-defined-symbols --skip-unimplemented \
13 ; RUN: | FileCheck %s --check-prefix=DIS 13 ; RUN: | FileCheck %s --check-prefix=DIS
14 14
15 ; Compile using integrated assembler. 15 ; Compile using integrated assembler.
16 ; RUN: %p2i --filetype=iasm -i %s --target=mips32 --args -O2 \ 16 ; RUN: %p2i --filetype=iasm -i %s --target=mips32 --args -O2 \
17 ; RUN: --allow-externally-defined-symbols --skip-unimplemented \ 17 ; RUN: --allow-externally-defined-symbols --skip-unimplemented \
18 ; RUN: | FileCheck %s --check-prefix=IASM 18 ; RUN: | FileCheck %s --check-prefix=IASM
19 19
20 ; Show bytes in assembled integrated code. 20 ; Show bytes in assembled integrated code.
21 ; RUN: %p2i --filetype=iasm -i %s --target=mips32 --assemble --disassemble \ 21 ; RUN: %p2i --filetype=iasm -i %s --target=mips32 --assemble --disassemble \
22 ; RUN: --args -O2 --allow-externally-defined-symbols --skip-unimplemented \ 22 ; RUN: --args -O2 --allow-externally-defined-symbols --skip-unimplemented \
23 ; RUN: | FileCheck %s --check-prefix=DIS 23 ; RUN: | FileCheck %s --check-prefix=DIS
24 24
25 declare i32 @llvm.ctlz.i32(i32, i1)
26 declare void @llvm.trap()
27
28 define internal i32 @encCtlz32(i32 %x) {
29 entry:
30 %r = call i32 @llvm.ctlz.i32(i32 %x, i1 false)
31 ret i32 %r
32 }
33
34 ; ASM-LABEL: encCtlz32
35 ; ASM-NEXT: .LencCtlz32$entry:
36 ; ASM-NEXT: clz $a0, $a0
37 ; ASM-NEXT: move $v0, $a0
38 ; ASM-NEXT: jr $ra
39
40 ; DIS-LABEL: 00000000 <encCtlz32>:
41 ; DIS-NEXT: 0: 70842020 clz a0,a0
42 ; DIS-NEXT: 4: 00801021 move v0,a0
43 ; DIS-NEXT: 8: 03e00008 jr ra
44
45 ; IASM-LABEL: encCtlz32
46 ; IASM-NEXT: .LencCtlz32$entry:
47 ; IASM-NEXT: .byte 0x20
48 ; IASM-NEXT: .byte 0x20
49 ; IASM-NEXT: .byte 0x84
50 ; IASM-NEXT: .byte 0x70
51 ; IASM-NEXT: .byte 0x21
52 ; IASM-NEXT: .byte 0x10
53 ; IASM-NEXT: .byte 0x80
54 ; IASM-NEXT: .byte 0x0
55 ; IASM-NEXT: .byte 0x8
56 ; IASM-NEXT: .byte 0x0
57 ; IASM-NEXT: .byte 0xe0
58 ; IASM-NEXT: .byte 0x3
59
25 define internal void @encTrap() { 60 define internal void @encTrap() {
26 unreachable 61 unreachable
27 } 62 }
28 63
29 ; ASM-LABEL: encTrap 64 ; ASM-LABEL: encTrap
30 ; ASM-NEXT: .LencTrap$__0: 65 ; ASM-NEXT: .LencTrap$__0:
31 ; ASM-NEXT: teq $zero, $zero, 0 66 ; ASM-NEXT: teq $zero, $zero, 0
32 67
33 ; DIS-LABEL: 00000000 <encTrap>: 68 ; DIS-LABEL: 00000010 <encTrap>:
34 ; DIS-NEXT: 0:» 00000034 » teq» zero,zero 69 ; DIS-NEXT: 10:» 00000034 » teq» zero,zero
35 70
36 ; IASM-LABEL: encTrap: 71 ; IASM-LABEL: encTrap:
37 ; IASM-NEXT: .LencTrap$__0: 72 ; IASM-NEXT: .LencTrap$__0:
38 ; IASM-NEXT: .byte 0x34 73 ; IASM-NEXT: .byte 0x34
39 ; IASM-NEXT: .byte 0x0 74 ; IASM-NEXT: .byte 0x0
40 ; IASM-NEXT: .byte 0x0 75 ; IASM-NEXT: .byte 0x0
41 ; IASM-NEXT: .byte 0x0 76 ; IASM-NEXT: .byte 0x0
OLDNEW
« no previous file with comments | « src/IceTargetLoweringMIPS32.cpp ('k') | tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698