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

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

Issue 639543002: Add cross test for vector itofp and fptoi casts. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: share more Created 6 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 | « runtime/szrt_i686.ll ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/fp.pnacl.ll
diff --git a/tests_lit/llvm2ice_tests/fp.pnacl.ll b/tests_lit/llvm2ice_tests/fp.pnacl.ll
index f207b7d47d7e6e412e82dbef9a4107476f8c2fee..8376ebd657c33933c639606d8f4de6c47534ce95 100644
--- a/tests_lit/llvm2ice_tests/fp.pnacl.ll
+++ b/tests_lit/llvm2ice_tests/fp.pnacl.ll
@@ -270,6 +270,14 @@ entry:
; CHECK-LABEL: doubleToSigned32
; CHECK: cvttsd2si
+define internal i32 @doubleToSigned32Const() {
+entry:
+ %conv = fptosi double 867.5309 to i32
+ ret i32 %conv
+}
+; CHECK-LABEL: doubleToSigned32Const
+; CHECK: cvttsd2si
+
define internal i32 @floatToSigned32(float %a) {
entry:
%conv = fptosi float %a to i32
@@ -465,6 +473,15 @@ entry:
; CHECK: cvtsi2sd
; CHECK: fld
+define internal double @signed32ToDoubleConst() {
+entry:
+ %conv = sitofp i32 123 to double
+ ret double %conv
+}
+; CHECK-LABEL: signed32ToDoubleConst
+; CHECK: cvtsi2sd {{.*[^1]}}
+; CHECK: fld
+
define internal float @signed32ToFloat(i32 %a) {
entry:
%conv = sitofp i32 %a to float
@@ -526,6 +543,15 @@ entry:
; CHECK: cvtsi2sd
; CHECK: fld
+define internal double @unsigned16ToDoubleConst() {
+entry:
+ %conv = uitofp i16 12345 to double
+ ret double %conv
+}
+; CHECK-LABEL: unsigned16ToDoubleConst
+; CHECK: cvtsi2sd
+; CHECK: fld
+
define internal float @unsigned16ToFloat(i32 %a) {
entry:
%a.arg_trunc = trunc i32 %a to i16
@@ -596,6 +622,38 @@ entry:
; CHECK: cvtsi2ss
; CHECK: fld
+define internal float @int32BitcastToFloat(i32 %a) {
+entry:
+ %conv = bitcast i32 %a to float
+ ret float %conv
+}
+; CHECK-LABEL: int32BitcastToFloat
+; CHECK: mov
+
+define internal float @int32BitcastToFloatConst() {
+entry:
+ %conv = bitcast i32 8675309 to float
+ ret float %conv
+}
+; CHECK-LABEL: int32BitcastToFloatConst
+; CHECK: mov
+
+define internal double @int64BitcastToDouble(i64 %a) {
+entry:
+ %conv = bitcast i64 %a to double
+ ret double %conv
+}
+; CHECK-LABEL: int64BitcastToDouble
+; CHECK: mov
+
+define internal double @int64BitcastToDoubleConst() {
+entry:
+ %conv = bitcast i64 9035768 to double
+ ret double %conv
+}
+; CHECK-LABEL: int64BitcastToDoubleConst
+; CHECK: mov
+
define internal void @fcmpEq(float %a, float %b, double %c, double %d) {
entry:
%cmp = fcmp oeq float %a, %b
« no previous file with comments | « runtime/szrt_i686.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698