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

Side by Side Diff: tests_lit/llvm2ice_tests/fp.cmp.ll

Issue 2412053002: [SubZero] Implement Fcmp, ICmp, Cast and Select for vector type (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase to master 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/vector-align.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 f32 and f64 compare operations. 1 ; This tries to be a comprehensive test of f32 and f64 compare operations.
2 2
3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ 3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \
4 ; RUN: -allow-externally-defined-symbols | FileCheck %s 4 ; RUN: -allow-externally-defined-symbols | FileCheck %s
5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \
6 ; RUN: -allow-externally-defined-symbols | FileCheck %s \ 6 ; RUN: -allow-externally-defined-symbols | FileCheck %s \
7 ; RUN: --check-prefix=CHECK-OM1 7 ; RUN: --check-prefix=CHECK-OM1
8 8
9 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=obj --disassemble \ 9 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=obj --disassemble \
10 ; RUN: --target arm32 -i %s --args -O2 \ 10 ; RUN: --target arm32 -i %s --args -O2 \
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 entry: 372 entry:
373 %cmp = fcmp false float %a, %b 373 %cmp = fcmp false float %a, %b
374 %cmp.ret_ext = zext i1 %cmp to i32 374 %cmp.ret_ext = zext i1 %cmp to i32
375 ret i32 %cmp.ret_ext 375 ret i32 %cmp.ret_ext
376 } 376 }
377 ; CHECK-LABEL: fcmpFalseFloat 377 ; CHECK-LABEL: fcmpFalseFloat
378 ; CHECK: mov {{.*}},0x0 378 ; CHECK: mov {{.*}},0x0
379 ; ARM32-LABEL: fcmpFalseFloat 379 ; ARM32-LABEL: fcmpFalseFloat
380 ; ARM32: mov [[R:r[0-9]+]], #0 380 ; ARM32: mov [[R:r[0-9]+]], #0
381 ; MIPS32-LABEL: fcmpFalseFloat 381 ; MIPS32-LABEL: fcmpFalseFloat
382 ; MIPS32: addiu 382 ; MIPS32: addiu [[R:.*]], $zero, 0
383 ; MIPS32: sb 383 ; MIPS32: andi [[R]], [[R]], 1
384 384
385 define internal i32 @fcmpFalseDouble(double %a, double %b) { 385 define internal i32 @fcmpFalseDouble(double %a, double %b) {
386 entry: 386 entry:
387 %cmp = fcmp false double %a, %b 387 %cmp = fcmp false double %a, %b
388 %cmp.ret_ext = zext i1 %cmp to i32 388 %cmp.ret_ext = zext i1 %cmp to i32
389 ret i32 %cmp.ret_ext 389 ret i32 %cmp.ret_ext
390 } 390 }
391 ; CHECK-LABEL: fcmpFalseDouble 391 ; CHECK-LABEL: fcmpFalseDouble
392 ; CHECK: mov {{.*}},0x0 392 ; CHECK: mov {{.*}},0x0
393 ; ARM32-LABEL: fcmpFalseDouble 393 ; ARM32-LABEL: fcmpFalseDouble
394 ; ARM32: mov [[R:r[0-9]+]], #0 394 ; ARM32: mov [[R:r[0-9]+]], #0
395 ; MIPS32-LABEL: fcmpFalseDouble 395 ; MIPS32-LABEL: fcmpFalseDouble
396 ; MIPS32: addiu 396 ; MIPS32: addiu [[R:.*]], $zero, 0
397 ; MIPS32: sb 397 ; MIPS32: andi [[R]], [[R]], 1
398 398
399 define internal i32 @fcmpOeqFloat(float %a, float %b) { 399 define internal i32 @fcmpOeqFloat(float %a, float %b) {
400 entry: 400 entry:
401 %cmp = fcmp oeq float %a, %b 401 %cmp = fcmp oeq float %a, %b
402 %cmp.ret_ext = zext i1 %cmp to i32 402 %cmp.ret_ext = zext i1 %cmp to i32
403 ret i32 %cmp.ret_ext 403 ret i32 %cmp.ret_ext
404 } 404 }
405 ; CHECK-LABEL: fcmpOeqFloat 405 ; CHECK-LABEL: fcmpOeqFloat
406 ; CHECK: ucomiss 406 ; CHECK: ucomiss
407 ; CHECK: jne 407 ; CHECK: jne
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 entry: 968 entry:
969 %cmp = fcmp true float %a, %b 969 %cmp = fcmp true float %a, %b
970 %cmp.ret_ext = zext i1 %cmp to i32 970 %cmp.ret_ext = zext i1 %cmp to i32
971 ret i32 %cmp.ret_ext 971 ret i32 %cmp.ret_ext
972 } 972 }
973 ; CHECK-LABEL: fcmpTrueFloat 973 ; CHECK-LABEL: fcmpTrueFloat
974 ; CHECK: mov {{.*}},0x1 974 ; CHECK: mov {{.*}},0x1
975 ; ARM32-LABEL: fcmpTrueFloat 975 ; ARM32-LABEL: fcmpTrueFloat
976 ; ARM32: mov {{r[0-9]+}}, #1 976 ; ARM32: mov {{r[0-9]+}}, #1
977 ; MIPS32-LABEL: fcmpTrueFloat 977 ; MIPS32-LABEL: fcmpTrueFloat
978 ; MIPS32: addiu 978 ; MIPS32: addiu [[R:.*]], $zero, 1
979 ; MIPS32: sb 979 ; MIPS32: andi [[R]], [[R]], 1
980 980
981 define internal i32 @fcmpTrueDouble(double %a, double %b) { 981 define internal i32 @fcmpTrueDouble(double %a, double %b) {
982 entry: 982 entry:
983 %cmp = fcmp true double %a, %b 983 %cmp = fcmp true double %a, %b
984 %cmp.ret_ext = zext i1 %cmp to i32 984 %cmp.ret_ext = zext i1 %cmp to i32
985 ret i32 %cmp.ret_ext 985 ret i32 %cmp.ret_ext
986 } 986 }
987 ; CHECK-LABEL: fcmpTrueDouble 987 ; CHECK-LABEL: fcmpTrueDouble
988 ; CHECK: mov {{.*}},0x1 988 ; CHECK: mov {{.*}},0x1
989 ; ARM32-LABEL: fcmpTrueDouble 989 ; ARM32-LABEL: fcmpTrueDouble
990 ; ARM32: mov {{r[0-9]+}}, #1 990 ; ARM32: mov {{r[0-9]+}}, #1
991 ; MIPS32-LABEL: fcmpTrueDouble 991 ; MIPS32-LABEL: fcmpTrueDouble
992 ; MIPS32: addiu 992 ; MIPS32: addiu [[R:.*]], $zero, 1
993 ; MIPS32: sb 993 ; MIPS32: andi [[R]], [[R]], 1
994 994
995 define internal float @selectFloatVarVar(float %a, float %b) { 995 define internal float @selectFloatVarVar(float %a, float %b) {
996 entry: 996 entry:
997 %cmp = fcmp olt float %a, %b 997 %cmp = fcmp olt float %a, %b
998 %cond = select i1 %cmp, float %a, float %b 998 %cond = select i1 %cmp, float %a, float %b
999 ret float %cond 999 ret float %cond
1000 } 1000 }
1001 ; CHECK-LABEL: selectFloatVarVar 1001 ; CHECK-LABEL: selectFloatVarVar
1002 ; CHECK: movss 1002 ; CHECK: movss
1003 ; CHECK: ucomiss 1003 ; CHECK: ucomiss
(...skipping 18 matching lines...) Expand all
1022 ; CHECK: ucomisd 1022 ; CHECK: ucomisd
1023 ; CHECK: ja 1023 ; CHECK: ja
1024 ; CHECK: movsd 1024 ; CHECK: movsd
1025 ; ARM32-LABEL: selectDoubleVarVar 1025 ; ARM32-LABEL: selectDoubleVarVar
1026 ; ARM32: vcmp.f64 1026 ; ARM32: vcmp.f64
1027 ; ARM32-OM1: vmovne.f64 d{{[0-9]+}} 1027 ; ARM32-OM1: vmovne.f64 d{{[0-9]+}}
1028 ; ARM32-O2: vmovmi.f64 d{{[0-9]+}} 1028 ; ARM32-O2: vmovmi.f64 d{{[0-9]+}}
1029 ; ARM32: bx 1029 ; ARM32: bx
1030 ; MIPS32-LABEL: selectDoubleVarVar 1030 ; MIPS32-LABEL: selectDoubleVarVar
1031 ; MIPS32: movn.d {{.*}} 1031 ; MIPS32: movn.d {{.*}}
OLDNEW
« no previous file with comments | « src/IceTargetLoweringMIPS32.cpp ('k') | tests_lit/llvm2ice_tests/vector-align.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698