41 lines · plain
1; Test conversions between integer and float elements on z15.2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z15 | FileCheck %s4 5; Test conversion of f32s to signed i32s.6define <4 x i32> @f1(<4 x float> %floats) {7; CHECK-LABEL: f1:8; CHECK: vcfeb %v24, %v24, 0, 59; CHECK: br %r1410 %dwords = fptosi <4 x float> %floats to <4 x i32>11 ret <4 x i32> %dwords12}13 14; Test conversion of f32s to unsigned i32s.15define <4 x i32> @f2(<4 x float> %floats) {16; CHECK-LABEL: f2:17; CHECK: vclfeb %v24, %v24, 0, 518; CHECK: br %r1419 %dwords = fptoui <4 x float> %floats to <4 x i32>20 ret <4 x i32> %dwords21}22 23; Test conversion of signed i32s to f32s.24define <4 x float> @f3(<4 x i32> %dwords) {25; CHECK-LABEL: f3:26; CHECK: vcefb %v24, %v24, 0, 027; CHECK: br %r1428 %floats = sitofp <4 x i32> %dwords to <4 x float>29 ret <4 x float> %floats30}31 32; Test conversion of unsigned i32s to f32s.33define <4 x float> @f4(<4 x i32> %dwords) {34; CHECK-LABEL: f4:35; CHECK: vcelfb %v24, %v24, 0, 036; CHECK: br %r1437 %floats = uitofp <4 x i32> %dwords to <4 x float>38 ret <4 x float> %floats39}40 41