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

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

Issue 1125323004: Subzero: Use cmov to improve lowering for the select instruction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove a rogue comment Created 5 years, 7 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 | « tests_lit/assembler/x86/sandboxing.ll ('k') | tests_lit/llvm2ice_tests/bool-folding.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 ; 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: %p2i --filetype=obj --disassemble -i %s --args -O2 \ 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \
6 ; RUN: | FileCheck %s 6 ; RUN: | FileCheck %s
7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ 7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \
8 ; RUN: | FileCheck --check-prefix=OPTM1 %s 8 ; RUN: | FileCheck --check-prefix=OPTM1 %s
9 9
10 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 10 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 %cond = select i1 %cmp, i64 %a, i64 %b 1183 %cond = select i1 %cmp, i64 %a, i64 %b
1184 ret i64 %cond 1184 ret i64 %cond
1185 } 1185 }
1186 ; CHECK-LABEL: select64VarVar 1186 ; CHECK-LABEL: select64VarVar
1187 ; CHECK: cmp 1187 ; CHECK: cmp
1188 ; CHECK: jb 1188 ; CHECK: jb
1189 ; CHECK: ja 1189 ; CHECK: ja
1190 ; CHECK: cmp 1190 ; CHECK: cmp
1191 ; CHECK: jb 1191 ; CHECK: jb
1192 ; CHECK: cmp 1192 ; CHECK: cmp
1193 ; CHECK: jne 1193 ; CHECK: cmovne
1194 ; 1194 ;
1195 ; OPTM1-LABEL: select64VarVar 1195 ; OPTM1-LABEL: select64VarVar
1196 ; OPTM1: cmp 1196 ; OPTM1: cmp
1197 ; OPTM1: jb 1197 ; OPTM1: jb
1198 ; OPTM1: ja 1198 ; OPTM1: ja
1199 ; OPTM1: cmp 1199 ; OPTM1: cmp
1200 ; OPTM1: jb 1200 ; OPTM1: jb
1201 ; OPTM1: cmp 1201 ; OPTM1: cmp
1202 ; OPTM1: jne 1202 ; OPTM1: cmovne
1203 1203
1204 define internal i64 @select64VarConst(i64 %a, i64 %b) { 1204 define internal i64 @select64VarConst(i64 %a, i64 %b) {
1205 entry: 1205 entry:
1206 %cmp = icmp ult i64 %a, %b 1206 %cmp = icmp ult i64 %a, %b
1207 %cond = select i1 %cmp, i64 %a, i64 -2401053092306725256 1207 %cond = select i1 %cmp, i64 %a, i64 -2401053092306725256
1208 ret i64 %cond 1208 ret i64 %cond
1209 } 1209 }
1210 ; CHECK-LABEL: select64VarConst 1210 ; CHECK-LABEL: select64VarConst
1211 ; CHECK: cmp 1211 ; CHECK: cmp
1212 ; CHECK: jb 1212 ; CHECK: jb
1213 ; CHECK: ja 1213 ; CHECK: ja
1214 ; CHECK: cmp 1214 ; CHECK: cmp
1215 ; CHECK: jb 1215 ; CHECK: jb
1216 ; CHECK: cmp 1216 ; CHECK: cmp
1217 ; CHECK: jne 1217 ; CHECK: cmovne
1218 ; 1218 ;
1219 ; OPTM1-LABEL: select64VarConst 1219 ; OPTM1-LABEL: select64VarConst
1220 ; OPTM1: cmp 1220 ; OPTM1: cmp
1221 ; OPTM1: jb 1221 ; OPTM1: jb
1222 ; OPTM1: ja 1222 ; OPTM1: ja
1223 ; OPTM1: cmp 1223 ; OPTM1: cmp
1224 ; OPTM1: jb 1224 ; OPTM1: jb
1225 ; OPTM1: cmp 1225 ; OPTM1: cmp
1226 ; OPTM1: jne 1226 ; OPTM1: cmovne
1227 1227
1228 define internal i64 @select64ConstVar(i64 %a, i64 %b) { 1228 define internal i64 @select64ConstVar(i64 %a, i64 %b) {
1229 entry: 1229 entry:
1230 %cmp = icmp ult i64 %a, %b 1230 %cmp = icmp ult i64 %a, %b
1231 %cond = select i1 %cmp, i64 -2401053092306725256, i64 %b 1231 %cond = select i1 %cmp, i64 -2401053092306725256, i64 %b
1232 ret i64 %cond 1232 ret i64 %cond
1233 } 1233 }
1234 ; CHECK-LABEL: select64ConstVar 1234 ; CHECK-LABEL: select64ConstVar
1235 ; CHECK: cmp 1235 ; CHECK: cmp
1236 ; CHECK: jb 1236 ; CHECK: jb
1237 ; CHECK: ja 1237 ; CHECK: ja
1238 ; CHECK: cmp 1238 ; CHECK: cmp
1239 ; CHECK: jb 1239 ; CHECK: jb
1240 ; CHECK: cmp 1240 ; CHECK: cmp
1241 ; CHECK: jne 1241 ; CHECK: cmove
1242 ; 1242 ;
1243 ; OPTM1-LABEL: select64ConstVar 1243 ; OPTM1-LABEL: select64ConstVar
1244 ; OPTM1: cmp 1244 ; OPTM1: cmp
1245 ; OPTM1: jb 1245 ; OPTM1: jb
1246 ; OPTM1: ja 1246 ; OPTM1: ja
1247 ; OPTM1: cmp 1247 ; OPTM1: cmp
1248 ; OPTM1: jb 1248 ; OPTM1: jb
1249 ; OPTM1: cmp 1249 ; OPTM1: cmp
1250 ; OPTM1: jne 1250 ; OPTM1: cmove
1251 1251
1252 define internal void @icmpEq64Imm() { 1252 define internal void @icmpEq64Imm() {
1253 entry: 1253 entry:
1254 %cmp = icmp eq i64 123, 234 1254 %cmp = icmp eq i64 123, 234
1255 br i1 %cmp, label %if.then, label %if.end 1255 br i1 %cmp, label %if.then, label %if.end
1256 1256
1257 if.then: ; preds = %entry 1257 if.then: ; preds = %entry
1258 call void @func() 1258 call void @func()
1259 br label %if.end 1259 br label %if.end
1260 1260
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 1295
1296 if.end3: ; preds = %if.then2, %if.end 1296 if.end3: ; preds = %if.then2, %if.end
1297 ret void 1297 ret void
1298 } 1298 }
1299 ; The following checks are not strictly necessary since one of the RUN 1299 ; The following checks are not strictly necessary since one of the RUN
1300 ; lines actually runs the output through the assembler. 1300 ; lines actually runs the output through the assembler.
1301 ; CHECK-LABEL: icmpLt64Imm 1301 ; CHECK-LABEL: icmpLt64Imm
1302 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, 1302 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}},
1303 ; OPTM1-LABEL: icmpLt64Imm 1303 ; OPTM1-LABEL: icmpLt64Imm
1304 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}}, 1304 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}},
OLDNEW
« no previous file with comments | « tests_lit/assembler/x86/sandboxing.ll ('k') | tests_lit/llvm2ice_tests/bool-folding.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698