1 ; Test conversion of floating-point values to unsigned integers.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
6 define i32 @f1(float %f) {
8 ; CHECK: clfebr %r2, 5, %f0, 0
10 %conv = fptoui float %f to i32
15 define i32 @f2(double %f) {
17 ; CHECK: clfdbr %r2, 5, %f0, 0
19 %conv = fptoui double %f to i32
24 define i32 @f3(fp128 *%src) {
26 ; CHECK-DAG: ld %f0, 0(%r2)
27 ; CHECK-DAG: ld %f2, 8(%r2)
28 ; CHECK: clfxbr %r2, 5, %f0, 0
30 %f = load fp128, fp128 *%src
31 %conv = fptoui fp128 %f to i32
36 define i64 @f4(float %f) {
38 ; CHECK: clgebr %r2, 5, %f0, 0
40 %conv = fptoui float %f to i64
45 define i64 @f5(double %f) {
47 ; CHECK: clgdbr %r2, 5, %f0, 0
49 %conv = fptoui double %f to i64
54 define i64 @f6(fp128 *%src) {
56 ; CHECK-DAG: ld %f0, 0(%r2)
57 ; CHECK-DAG: ld %f2, 8(%r2)
58 ; CHECK: clgxbr %r2, 5, %f0, 0
60 %f = load fp128, fp128 *%src
61 %conv = fptoui fp128 %f to i64