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

Side by Side Diff: tests_lit/llvm2ice_tests/64bit.pnacl.ll

Issue 1394413002: Subzero: Don't "and" i1 values with 1. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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
OLDNEW
1 ; This tries to be a comprehensive test of i64 operations, in 1 ; This tries to be a comprehensive test of i64 operations, in
2 ; particular the patterns for lowering i64 operations into constituent 2 ; particular the patterns for lowering i64 operations into constituent
3 ; i32 operations on x86-32. 3 ; i32 operations on x86-32.
4 4
5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 5 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
6 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ 6 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \
7 ; RUN: | %if --need=target_X8632 --command FileCheck %s 7 ; RUN: | %if --need=target_X8632 --command FileCheck %s
8 8
9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \ 10 ; RUN: --target x8632 -i %s --args -Om1 -allow-externally-defined-symbols \
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 define internal i32 @trunc64To1(i64 %a) { 834 define internal i32 @trunc64To1(i64 %a) {
835 entry: 835 entry:
836 ; %tobool = icmp ne i64 %a, 0 836 ; %tobool = icmp ne i64 %a, 0
837 %tobool = trunc i64 %a to i1 837 %tobool = trunc i64 %a to i1
838 %tobool.ret_ext = zext i1 %tobool to i32 838 %tobool.ret_ext = zext i1 %tobool to i32
839 ret i32 %tobool.ret_ext 839 ret i32 %tobool.ret_ext
840 } 840 }
841 ; CHECK-LABEL: trunc64To1 841 ; CHECK-LABEL: trunc64To1
842 ; CHECK: mov eax,DWORD PTR [esp+0x4] 842 ; CHECK: mov eax,DWORD PTR [esp+0x4]
843 ; CHECK: and eax,0x1 843 ; CHECK: and eax,0x1
844 ; CHECK: and eax,0x1 844 ; CHECK-NOT: and eax,0x1
845 ; 845 ;
846 ; OPTM1-LABEL: trunc64To1 846 ; OPTM1-LABEL: trunc64To1
847 ; OPTM1: mov eax,DWORD PTR [esp+ 847 ; OPTM1: mov eax,DWORD PTR [esp+
848 ; OPTM1: and eax,0x1 848 ; OPTM1: and eax,0x1
849 ; OPTM1: and eax,0x1 849 ; OPTM1-NOT: and eax,0x1
850 850
851 ; ARM32-LABEL: trunc64To1 851 ; ARM32-LABEL: trunc64To1
852 ; ARM32: and r0, r0, #1 852 ; ARM32: and r0, r0, #1
853 ; ARM32: and r0, r0, #1 853 ; ARM32: and r0, r0, #1
854 854
855 define internal i64 @sext32To64(i32 %a) { 855 define internal i64 @sext32To64(i32 %a) {
856 entry: 856 entry:
857 %conv = sext i32 %a to i64 857 %conv = sext i32 %a to i64
858 ret i64 %conv 858 ret i64 %conv
859 } 859 }
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 ; CHECK-LABEL: phi64Undef 1810 ; CHECK-LABEL: phi64Undef
1811 ; CHECK: mov {{.*}},0x0 1811 ; CHECK: mov {{.*}},0x0
1812 ; CHECK: mov {{.*}},0x0 1812 ; CHECK: mov {{.*}},0x0
1813 ; OPTM1-LABEL: phi64Undef 1813 ; OPTM1-LABEL: phi64Undef
1814 ; OPTM1: mov {{.*}},0x0 1814 ; OPTM1: mov {{.*}},0x0
1815 ; OPTM1: mov {{.*}},0x0 1815 ; OPTM1: mov {{.*}},0x0
1816 ; ARM32-LABEL: phi64Undef 1816 ; ARM32-LABEL: phi64Undef
1817 ; ARM32: mov {{.*}} #0 1817 ; ARM32: mov {{.*}} #0
1818 ; ARM32: mov {{.*}} #0 1818 ; ARM32: mov {{.*}} #0
1819 1819
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698