1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2 # RUN: llc -mtriple=riscv32 -mattr=+d -run-pass=instruction-select -verify-machineinstrs %s -o - | \
13 ; CHECK-LABEL: name: is_fpclass_f32
14 ; CHECK: liveins: $f10_f
16 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
17 ; CHECK-NEXT: [[FCLASS_S:%[0-9]+]]:gpr = FCLASS_S [[COPY]]
18 ; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[FCLASS_S]], 152
19 ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[ANDI]]
20 ; CHECK-NEXT: $x10 = COPY [[SLTU]]
21 ; CHECK-NEXT: PseudoRET implicit $x10
22 %0:fprb(s32) = COPY $f10_f
23 %3:gprb(s32) = G_CONSTANT i32 152
24 %4:gprb(s32) = G_CONSTANT i32 0
25 %5:gprb(s32) = G_FCLASS %0(s32)
26 %6:gprb(s32) = G_AND %5, %3
27 %7:gprb(s32) = G_ICMP intpred(ne), %6(s32), %4
29 PseudoRET implicit $x10
32 name: is_fpclass_f32_onehot
39 ; CHECK-LABEL: name: is_fpclass_f32_onehot
40 ; CHECK: liveins: $f10_f
42 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
43 ; CHECK-NEXT: [[FCLASS_S:%[0-9]+]]:gpr = FCLASS_S [[COPY]]
44 ; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[FCLASS_S]], 256
45 ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[ANDI]]
46 ; CHECK-NEXT: $x10 = COPY [[SLTU]]
47 ; CHECK-NEXT: PseudoRET implicit $x10
48 %0:fprb(s32) = COPY $f10_f
49 %3:gprb(s32) = G_CONSTANT i32 256
50 %4:gprb(s32) = G_CONSTANT i32 0
51 %5:gprb(s32) = G_FCLASS %0(s32)
52 %6:gprb(s32) = G_AND %5, %3
53 %7:gprb(s32) = G_ICMP intpred(ne), %6(s32), %4
55 PseudoRET implicit $x10
58 name: is_fpclass_f32_one
65 ; CHECK-LABEL: name: is_fpclass_f32_one
66 ; CHECK: liveins: $f10_f
68 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr32 = COPY $f10_f
69 ; CHECK-NEXT: [[FCLASS_S:%[0-9]+]]:gpr = FCLASS_S [[COPY]]
70 ; CHECK-NEXT: [[ANDI:%[0-9]+]]:gpr = ANDI [[FCLASS_S]], 1
71 ; CHECK-NEXT: [[SLTU:%[0-9]+]]:gpr = SLTU $x0, [[ANDI]]
72 ; CHECK-NEXT: $x10 = COPY [[SLTU]]
73 ; CHECK-NEXT: PseudoRET implicit $x10
74 %0:fprb(s32) = COPY $f10_f
75 %3:gprb(s32) = G_CONSTANT i32 1
76 %4:gprb(s32) = G_CONSTANT i32 0
77 %5:gprb(s32) = G_FCLASS %0(s32)
78 %6:gprb(s32) = G_AND %5, %3
79 %7:gprb(s32) = G_ICMP intpred(ne), %6(s32), %4
81 PseudoRET implicit $x10