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

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

Issue 2077503002: Subzero: Build a better bitcast. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 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/IceTargetLoweringX86BaseImpl.h ('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 ; Trivial smoke test of bitcast between integer and FP types. 1 ; Trivial smoke test of bitcast between integer and FP types.
2 2
3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s 3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s
4 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s 4 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s
5 5
6 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \ 6 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \
7 ; RUN: --target arm32 -i %s --args -O2 --skip-unimplemented \ 7 ; RUN: --target arm32 -i %s --args -O2 --skip-unimplemented \
8 ; RUN: | %if --need=allow_dump --need=target_ARM32 --command FileCheck %s \ 8 ; RUN: | %if --need=allow_dump --need=target_ARM32 --command FileCheck %s \
9 ; RUN: --check-prefix=ARM32 9 ; RUN: --check-prefix=ARM32
10 10
11 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \ 11 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \
12 ; RUN: --target arm32 -i %s --args -Om1 --skip-unimplemented \ 12 ; RUN: --target arm32 -i %s --args -Om1 --skip-unimplemented \
13 ; RUN: | %if --need=allow_dump --need=target_ARM32 --command FileCheck %s \ 13 ; RUN: | %if --need=allow_dump --need=target_ARM32 --command FileCheck %s \
14 ; RUN: --check-prefix=ARM32 14 ; RUN: --check-prefix=ARM32
15 15
16 define internal i32 @cast_f2i(float %f) { 16 define internal i32 @cast_f2i(float %f) {
17 entry: 17 entry:
18 %v0 = bitcast float %f to i32 18 %v0 = bitcast float %f to i32
19 ret i32 %v0 19 ret i32 %v0
20 } 20 }
21 ; CHECK-LABEL: cast_f2i 21 ; CHECK-LABEL: cast_f2i
22 ; CHECK: mov eax 22 ; CHECK: movd eax
23 ; ARM32-LABEL: cast_f2i 23 ; ARM32-LABEL: cast_f2i
24 ; ARM32: vmov r{{[0-9]+}}, s{{[0-9]+}} 24 ; ARM32: vmov r{{[0-9]+}}, s{{[0-9]+}}
25 25
26 define internal float @cast_i2f(i32 %i) { 26 define internal float @cast_i2f(i32 %i) {
27 entry: 27 entry:
28 %v0 = bitcast i32 %i to float 28 %v0 = bitcast i32 %i to float
29 ret float %v0 29 ret float %v0
30 } 30 }
31 ; CHECK-LABEL: cast_i2f 31 ; CHECK-LABEL: cast_i2f
32 ; CHECK: fld DWORD PTR 32 ; CHECK: fld DWORD PTR
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 ; CHECK-LABEL: cast_ll2d_const 75 ; CHECK-LABEL: cast_ll2d_const
76 ; CHECK: mov {{.*}},0x73ce2ff2 76 ; CHECK: mov {{.*}},0x73ce2ff2
77 ; CHECK: mov {{.*}},0xb3a 77 ; CHECK: mov {{.*}},0xb3a
78 ; CHECK: fld QWORD PTR 78 ; CHECK: fld QWORD PTR
79 ; ARM32-LABEL: cast_ll2d_const 79 ; ARM32-LABEL: cast_ll2d_const
80 ; ARM32-DAG: movw [[REG0:r[0-9]+]], #12274 80 ; ARM32-DAG: movw [[REG0:r[0-9]+]], #12274
81 ; ARM32-DAG: movt [[REG0:r[0-9]+]], #29646 81 ; ARM32-DAG: movt [[REG0:r[0-9]+]], #29646
82 ; ARM32-DAG: movw [[REG1:r[0-9]+]], #2874 82 ; ARM32-DAG: movw [[REG1:r[0-9]+]], #2874
83 ; ARM32: vmov d{{[0-9]+}}, [[REG0]], [[REG1]] 83 ; ARM32: vmov d{{[0-9]+}}, [[REG0]], [[REG1]]
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698