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=regbankselect -verify-machineinstrs %s -o - \
12 ; CHECK-LABEL: name: is_fpclass_f32
13 ; CHECK: liveins: $f10_f
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f10_f
16 ; CHECK-NEXT: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 152
17 ; CHECK-NEXT: [[C1:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 0
18 ; CHECK-NEXT: [[FCLASS:%[0-9]+]]:gprb(s32) = G_FCLASS [[COPY]](s32)
19 ; CHECK-NEXT: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[FCLASS]], [[C]]
20 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:gprb(s32) = G_ICMP intpred(ne), [[AND]](s32), [[C1]]
21 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
22 ; CHECK-NEXT: PseudoRET implicit $x10
23 %0:_(s32) = COPY $f10_f
24 %3:_(s32) = G_CONSTANT i32 152
25 %4:_(s32) = G_CONSTANT i32 0
26 %5:_(s32) = G_FCLASS %0(s32)
27 %6:_(s32) = G_AND %5, %3
28 %7:_(s32) = G_ICMP intpred(ne), %6(s32), %4
30 PseudoRET implicit $x10
39 ; CHECK-LABEL: name: is_fpclass_f64
40 ; CHECK: liveins: $f10_d
42 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fprb(s64) = COPY $f10_d
43 ; CHECK-NEXT: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 152
44 ; CHECK-NEXT: [[C1:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 0
45 ; CHECK-NEXT: [[FCLASS:%[0-9]+]]:gprb(s32) = G_FCLASS [[COPY]](s64)
46 ; CHECK-NEXT: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[FCLASS]], [[C]]
47 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:gprb(s32) = G_ICMP intpred(ne), [[AND]](s32), [[C1]]
48 ; CHECK-NEXT: $x10 = COPY [[ICMP]](s32)
49 ; CHECK-NEXT: PseudoRET implicit $x10
50 %0:_(s64) = COPY $f10_d
51 %3:_(s32) = G_CONSTANT i32 152
52 %4:_(s32) = G_CONSTANT i32 0
53 %5:_(s32) = G_FCLASS %0(s64)
54 %6:_(s32) = G_AND %5, %3
55 %7:_(s32) = G_ICMP intpred(ne), %6(s32), %4
57 PseudoRET implicit $x10