1 ; Test the Test Data Class instruction logic operation conversion from
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
9 define i32 @f1(float %x) {
11 ; CHECK: tceb %f0, 1365
12 %cast = bitcast float %x to i32
13 %res = icmp slt i32 %cast, 0
14 %xres = zext i1 %res to i32
18 ; Extract negated sign bit.
19 define i32 @f2(float %x) {
21 ; CHECK: tceb %f0, 2730
22 %cast = bitcast float %x to i32
23 %res = icmp sgt i32 %cast, -1
24 %xres = zext i1 %res to i32
29 define i32 @f3(double %x) {
31 ; CHECK: tcdb %f0, 1365
32 %cast = bitcast double %x to i64
33 %res = icmp slt i64 %cast, 0
34 %xres = zext i1 %res to i32
38 ; Extract negated sign bit.
39 define i32 @f4(double %x) {
41 ; CHECK: tcdb %f0, 2730
42 %cast = bitcast double %x to i64
43 %res = icmp sgt i64 %cast, -1
44 %xres = zext i1 %res to i32
49 define i32 @f5(fp128 %x) {
51 ; CHECK: tcxb %f0, 1365
52 %cast = bitcast fp128 %x to i128
53 %res = icmp slt i128 %cast, 0
54 %xres = zext i1 %res to i32
58 ; Extract negated sign bit.
59 define i32 @f6(fp128 %x) {
61 ; CHECK: tcxb %f0, 2730
62 %cast = bitcast fp128 %x to i128
63 %res = icmp sgt i128 %cast, -1
64 %xres = zext i1 %res to i32
69 define i32 @f7(float %x) {
72 %cast = bitcast float %x to i32
73 %res = icmp slt i32 %cast, -1
74 %xres = zext i1 %res to i32
79 define i32 @f8(float %x) {
82 %cast = bitcast float %x to i32
83 %res = icmp eq i32 %cast, 0
84 %xres = zext i1 %res to i32