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

Unified Diff: tests_lit/llvm2ice_tests/sdiv.ll

Issue 2448193008: Subzero, MIPS32: Enable MIPS support in lit tests (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: tests_lit/llvm2ice_tests/sdiv.ll
diff --git a/tests_lit/llvm2ice_tests/sdiv.ll b/tests_lit/llvm2ice_tests/sdiv.ll
index cac138e8a89e7a1a8aa47d0a751e0aed408f5900..4097a55edc8af3c68384cfb97929eb6c79ad9637 100644
--- a/tests_lit/llvm2ice_tests/sdiv.ll
+++ b/tests_lit/llvm2ice_tests/sdiv.ll
@@ -4,6 +4,12 @@
; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s
; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 | FileCheck %s
+; RUN: %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command %p2i --filetype=asm --assemble --disassemble --target \
+; RUN: mips32 -i %s --args -O2 -allow-externally-defined-symbols \
+; RUN: | %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command FileCheck --check-prefix MIPS32 %s
+
define internal i32 @sdiv_i8(i32 %a.i32, i32 %b.i32) {
entry:
%a = trunc i32 %a.i32 to i8
@@ -14,6 +20,11 @@ entry:
; CHECK-LABEL: sdiv_i8
; CHECK: cbw
; CHECK: idiv
+; MIPS32-LABEL: sdiv_i8
+; MIPS32: div
+; MIPS32: teq
+; MIPS32: mflo
+; MIPS32: andi {{.*}},0xff
}
define internal i32 @sdiv_i16(i32 %a.i32, i32 %b.i32) {
@@ -26,6 +37,11 @@ entry:
; CHECK-LABEL: sdiv_i16
; CHECK: cwd
; CHECK: idiv
+; MIPS32-LABEL: sdiv_i16
+; MIPS32: div
+; MIPS32: teq
+; MIPS32: mflo
+; MIPS32: andi {{.*}},0xffff
}
define internal i32 @sdiv_i32(i32 %a, i32 %b) {
@@ -35,6 +51,10 @@ entry:
; CHECK-LABEL: sdiv_i32
; CHECK: cdq
; CHECK: idiv
+; MIPS32-LABEL: sdiv_i32
+; MIPS32: div
+; MIPS32: teq
+; MIPS32: mflo
}
define internal i32 @srem_i8(i32 %a.i32, i32 %b.i32) {
@@ -47,6 +67,11 @@ entry:
; CHECK-LABEL: srem_i8
; CHECK: cbw
; CHECK: idiv
+; MIPS32-LABEL: srem_i8
+; MIPS32: div
+; MIPS32: teq
+; MIPS32: mfhi
+; MIPS32: andi {{.*}},0xff
}
define internal i32 @srem_i16(i32 %a.i32, i32 %b.i32) {
@@ -59,6 +84,11 @@ entry:
; CHECK-LABEL: srem_i16
; CHECK: cwd
; CHECK: idiv
+; MIPS32-LABEL: srem_i16
+; MIPS32: div
+; MIPS32: teq
+; MIPS32: mfhi
+; MIPS32: andi {{.*}},0xffff
}
define internal i32 @srem_i32(i32 %a, i32 %b) {
@@ -68,4 +98,8 @@ entry:
; CHECK-LABEL: srem_i32
; CHECK: cdq
; CHECK: idiv
+; MIPS32-LABEL: srem_i32
+; MIPS32: div
+; MIPS32: teq
+; MIPS32: mfhi
}

Powered by Google App Engine
This is Rietveld 408576698