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

Unified Diff: tests_lit/llvm2ice_tests/fp.convert.ll

Issue 2316933002: [SubZero] Implement GP to/from FP moves for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tests_lit/llvm2ice_tests/fp.convert.ll
diff --git a/tests_lit/llvm2ice_tests/fp.convert.ll b/tests_lit/llvm2ice_tests/fp.convert.ll
index 4fc71f8f517a9d472c1481f4881f1c7356d085a4..85ef4a564e084093d04285229167fdeffa16fcd4 100644
--- a/tests_lit/llvm2ice_tests/fp.convert.ll
+++ b/tests_lit/llvm2ice_tests/fp.convert.ll
@@ -16,6 +16,11 @@
; RUN: | %if --need=allow_dump --need=target_ARM32 --command FileCheck %s \
; RUN: --check-prefix=ARM32
+; RUN: %if --need=allow_dump --need=target_MIPS32 --command %p2i \
+; RUN: --filetype=asm --target mips32 -i %s --args -O2 --skip-unimplemented \
+; RUN: | %if --need=allow_dump --need=target_MIPS32 --command FileCheck %s \
+; RUN: --check-prefix=MIPS32
+
define internal float @fptrunc(double %a) {
entry:
%conv = fptrunc double %a to float
@@ -113,6 +118,9 @@ entry:
; ARM32-LABEL: floatToSigned32
; ARM32-DAG: vcvt.s32.f32 [[REG:s[0-9]+]], {{s[0-9]+}}
; ARM32-DAG: vmov {{r[0-9]+}}, [[REG]]
+; MIPS32-LABEL: floatToSigned32
+; MIPS32: trunc.w.s $f12, $f12
+; MIPS32: mfc1 $v0, $f12
define internal i32 @doubleToUnsigned32(double %a) {
entry:
@@ -373,6 +381,9 @@ entry:
; ARM32-LABEL: signed32ToFloat
; ARM32-DAG: vmov [[SRC:s[0-9]+]], {{r[0-9]+}}
; ARM32-DAG: vcvt.f32.s32 {{s[0-9]+}}, [[SRC]]
+; MIPS32-LABEL: signed32ToFloat
+; MIPS32: mtc1 $a0, $f0
+; MIPS32: cvt.s.w $f0, $f0
define internal double @unsigned32ToDouble(i32 %a) {
entry:

Powered by Google App Engine
This is Rietveld 408576698