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

Unified Diff: tests_lit/llvm2ice_tests/vector-fcmp.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-align.ll ('k') | tests_lit/llvm2ice_tests/vector-icmp.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/vector-fcmp.ll
diff --git a/tests_lit/llvm2ice_tests/vector-fcmp.ll b/tests_lit/llvm2ice_tests/vector-fcmp.ll
index 97e438b724d55e904c80f4978a428f0db49b80ff..9703d15b5bc8a22ddff2eb18a30f1a6a8aead872 100644
--- a/tests_lit/llvm2ice_tests/vector-fcmp.ll
+++ b/tests_lit/llvm2ice_tests/vector-fcmp.ll
@@ -4,6 +4,12 @@
; RUN: %p2i -i %s --filetype=obj --disassemble -a -O2 | FileCheck %s
; RUN: %p2i -i %s --filetype=obj --disassemble -a -Om1 | FileCheck %s
+; RUN: %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command %p2i --filetype=asm --assemble --disassemble --target mips32\
+; RUN: -i %s --args -O2 --skip-unimplemented \
+; RUN: | %if --need=target_MIPS32 --need=allow_dump \
+; RUN: --command FileCheck --check-prefix MIPS32 %s
+
; Check that sext elimination occurs when the result of the comparison
; instruction is alrady sign extended. Sign extension to 4 x i32 uses
; the pslld instruction.
@@ -16,6 +22,19 @@ entry:
; CHECK: cmpeqps
; CHECK-NOT: pslld
}
+; MIPS32-LABEL: sextElimination
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpFalseVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -25,6 +44,11 @@ entry:
; CHECK-LABEL: fcmpFalseVector
; CHECK: pxor
}
+; MIPS32-LABEL: fcmpFalseVector
+; MIPS32: li v0,0
+; MIPS32: li v1,0
+; MIPS32: li a0,0
+; MIPS32: li a1,0
define internal <4 x i32> @fcmpOeqVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -34,6 +58,19 @@ entry:
; CHECK-LABEL: fcmpOeqVector
; CHECK: cmpeqps
}
+; MIPS32-LABEL: fcmpOeqVector
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpOgeVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -43,6 +80,19 @@ entry:
; CHECK-LABEL: fcmpOgeVector
; CHECK: cmpleps
}
+; MIPS32-LABEL: fcmpOgeVector
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpOgtVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -52,6 +102,19 @@ entry:
; CHECK-LABEL: fcmpOgtVector
; CHECK: cmpltps
}
+; MIPS32-LABEL: fcmpOgtVector
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpOleVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -61,6 +124,19 @@ entry:
; CHECK-LABEL: fcmpOleVector
; CHECK: cmpleps
}
+; MIPS32-LABEL: fcmpOleVector
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpOltVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -70,6 +146,19 @@ entry:
; CHECK-LABEL: fcmpOltVector
; CHECK: cmpltps
}
+; MIPS32-LABEL: fcmpOltVector
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpOneVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -81,6 +170,19 @@ entry:
; CHECK: cmpordps
; CHECK: pand
}
+; MIPS32-LABEL: fcmpOneVector
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpOrdVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -90,6 +192,19 @@ entry:
; CHECK-LABEL: fcmpOrdVector
; CHECK: cmpordps
}
+; MIPS32-LABEL: fcmpOrdVector
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpTrueVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -99,6 +214,11 @@ entry:
; CHECK-LABEL: fcmpTrueVector
; CHECK: pcmpeqd
}
+; MIPS32-LABEL: fcmpTrueVector
+; MIPS32: li v0,1
+; MIPS32: li v1,1
+; MIPS32: li a0,1
+; MIPS32: li a1,1
define internal <4 x i32> @fcmpUeqVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -110,6 +230,19 @@ entry:
; CHECK: cmpunordps
; CHECK: por
}
+; MIPS32-LABEL: fcmpUeqVector
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ueq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpUgeVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -119,6 +252,19 @@ entry:
; CHECK-LABEL: fcmpUgeVector
; CHECK: cmpnltps
}
+; MIPS32-LABEL: fcmpUgeVector
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.olt.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpUgtVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -128,6 +274,19 @@ entry:
; CHECK-LABEL: fcmpUgtVector
; CHECK: cmpnleps
}
+; MIPS32-LABEL: fcmpUgtVector
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.ole.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpUleVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -137,6 +296,19 @@ entry:
; CHECK-LABEL: fcmpUleVector
; CHECK: cmpnltps
}
+; MIPS32-LABEL: fcmpUleVector
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ule.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpUltVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -146,6 +318,19 @@ entry:
; CHECK-LABEL: fcmpUltVector
; CHECK: cmpnleps
}
+; MIPS32-LABEL: fcmpUltVector
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.ult.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
define internal <4 x i32> @fcmpUneVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -155,6 +340,19 @@ entry:
; CHECK-LABEL: fcmpUneVector
; CHECK: cmpneqps
}
+; MIPS32-LABEL: fcmpUneVector
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
+; MIPS32: c.eq.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movt [[R]],zero,$fcc0
define internal <4 x i32> @fcmpUnoVector(<4 x float> %a, <4 x float> %b) {
entry:
@@ -164,3 +362,16 @@ entry:
; CHECK-LABEL: fcmpUnoVector
; CHECK: cmpunordps
}
+; MIPS32-LABEL: fcmpUnoVector
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
+; MIPS32: c.un.s
+; MIPS32: li [[R:.*]],1
+; MIPS32: movf [[R]],zero,$fcc0
« no previous file with comments | « tests_lit/llvm2ice_tests/vector-align.ll ('k') | tests_lit/llvm2ice_tests/vector-icmp.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698