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

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

Issue 2017043002: [Subzero][MIPS32] Implement i1 cast operations (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
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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 ; 963 ;
964 ; OPTM1-LABEL: trunc64To1 964 ; OPTM1-LABEL: trunc64To1
965 ; OPTM1: mov eax,DWORD PTR [esp+ 965 ; OPTM1: mov eax,DWORD PTR [esp+
966 ; OPTM1: and al,0x1 966 ; OPTM1: and al,0x1
967 ; OPTM1-NOT: and eax,0x1 967 ; OPTM1-NOT: and eax,0x1
968 968
969 ; ARM32-LABEL: trunc64To1 969 ; ARM32-LABEL: trunc64To1
970 ; ARM32-OM1: and r0, r0, #1 970 ; ARM32-OM1: and r0, r0, #1
971 ; ARM32-O2: and r0, r0, #1 971 ; ARM32-O2: and r0, r0, #1
972 972
973 ; MIPS32-LABEL: trunc64To1
974 ; MIPS32: andi {{.*}},a0,0x1
975 ; MIPS32: move v0,{{.*}}
976
973 define internal i64 @sext32To64(i32 %a) { 977 define internal i64 @sext32To64(i32 %a) {
974 entry: 978 entry:
975 %conv = sext i32 %a to i64 979 %conv = sext i32 %a to i64
976 ret i64 %conv 980 ret i64 %conv
977 } 981 }
978 ; CHECK-LABEL: sext32To64 982 ; CHECK-LABEL: sext32To64
979 ; CHECK: mov 983 ; CHECK: mov
980 ; CHECK: sar {{.*}},0x1f 984 ; CHECK: sar {{.*}},0x1f
981 ; 985 ;
982 ; OPTM1-LABEL: sext32To64 986 ; OPTM1-LABEL: sext32To64
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 ; OPTM1: mov 1057 ; OPTM1: mov
1054 ; OPTM1: shl {{.*}},0x1f 1058 ; OPTM1: shl {{.*}},0x1f
1055 ; OPTM1: sar {{.*}},0x1f 1059 ; OPTM1: sar {{.*}},0x1f
1056 1060
1057 ; ARM32-LABEL: sext1To64 1061 ; ARM32-LABEL: sext1To64
1058 ; ARM32: mov {{.*}}, #0 1062 ; ARM32: mov {{.*}}, #0
1059 ; ARM32: tst {{.*}}, #1 1063 ; ARM32: tst {{.*}}, #1
1060 ; ARM32: mvn {{.*}}, #0 1064 ; ARM32: mvn {{.*}}, #0
1061 ; ARM32: movne 1065 ; ARM32: movne
1062 1066
1067 ; MIPS32-LABEL: sext1To64
1068 ; MIPS32: sll {{.*}},a0,0x1f
1069 ; MIPS32: sra {{.*}},{{.*}},0x1f
1070 ; MIPS32: move v1,{{.*}}
1071 ; MIPS32: move v0,{{.*}}
1072
1063 define internal i64 @zext32To64(i32 %a) { 1073 define internal i64 @zext32To64(i32 %a) {
1064 entry: 1074 entry:
1065 %conv = zext i32 %a to i64 1075 %conv = zext i32 %a to i64
1066 ret i64 %conv 1076 ret i64 %conv
1067 } 1077 }
1068 ; CHECK-LABEL: zext32To64 1078 ; CHECK-LABEL: zext32To64
1069 ; CHECK: mov 1079 ; CHECK: mov
1070 ; CHECK: mov {{.*}},0x0 1080 ; CHECK: mov {{.*}},0x0
1071 ; 1081 ;
1072 ; OPTM1-LABEL: zext32To64 1082 ; OPTM1-LABEL: zext32To64
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 ; 1148 ;
1139 ; OPTM1-LABEL: zext1To64 1149 ; OPTM1-LABEL: zext1To64
1140 ; OPTM1: and {{.*}},0x1 1150 ; OPTM1: and {{.*}},0x1
1141 ; OPTM1: mov {{.*}},0x0 1151 ; OPTM1: mov {{.*}},0x0
1142 1152
1143 ; ARM32-LABEL: zext1To64 1153 ; ARM32-LABEL: zext1To64
1144 ; ARM32: and {{.*}}, #1 1154 ; ARM32: and {{.*}}, #1
1145 ; ARM32: mov {{.*}}, #0 1155 ; ARM32: mov {{.*}}, #0
1146 ; ARM32: bx 1156 ; ARM32: bx
1147 1157
1158 ; MIPS32-LABEL: zext1To64
1159 ; MIPS32: andi {{.*}},a0,0x1
1160 ; MIPS32: li v1,0
1161 ; MIPS32: move v0,{{.*}}
1162
1148 define internal void @icmpEq64(i64 %a, i64 %b, i64 %c, i64 %d) { 1163 define internal void @icmpEq64(i64 %a, i64 %b, i64 %c, i64 %d) {
1149 entry: 1164 entry:
1150 %cmp = icmp eq i64 %a, %b 1165 %cmp = icmp eq i64 %a, %b
1151 br i1 %cmp, label %if.then, label %if.end 1166 br i1 %cmp, label %if.then, label %if.end
1152 1167
1153 if.then: ; preds = %entry 1168 if.then: ; preds = %entry
1154 call void @func() 1169 call void @func()
1155 br label %if.end 1170 br label %if.end
1156 1171
1157 if.end: ; preds = %if.then, %entry 1172 if.end: ; preds = %if.then, %entry
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 %s = lshr i64 %a, 40 2052 %s = lshr i64 %a, 40
2038 %t = trunc i64 %s to i32 2053 %t = trunc i64 %s to i32
2039 %r = sub i32 %t, 1 2054 %r = sub i32 %t, 1
2040 ret i32 %r 2055 ret i32 %r
2041 ; ARM32-LABEL: subOneToUpperAfterShift 2056 ; ARM32-LABEL: subOneToUpperAfterShift
2042 ; ARM32: subs 2057 ; ARM32: subs
2043 ; ARM32: sbc 2058 ; ARM32: sbc
2044 ; ARM32: lsr 2059 ; ARM32: lsr
2045 ; ARM32: sub 2060 ; ARM32: sub
2046 } 2061 }
OLDNEW
« src/IceTargetLoweringMIPS32.cpp ('K') | « src/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698