1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -mattr=+zbb -run-pass=instruction-select \
3 # RUN: -simplify-mir -verify-machineinstrs %s -o - \
4 # RUN: | FileCheck -check-prefix=RV64I %s
12 ; RV64I-LABEL: name: smax_i64
13 ; RV64I: [[COPY:%[0-9]+]]:gpr = COPY $x10
14 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
15 ; RV64I-NEXT: [[MAX:%[0-9]+]]:gpr = MAX [[COPY]], [[COPY1]]
16 ; RV64I-NEXT: $x10 = COPY [[MAX]]
17 ; RV64I-NEXT: PseudoRET implicit $x10
18 %0:gprb(s64) = COPY $x10
19 %1:gprb(s64) = COPY $x11
20 %2:gprb(s64) = G_SMAX %0, %1
22 PseudoRET implicit $x10
31 ; RV64I-LABEL: name: smin_i64
32 ; RV64I: [[COPY:%[0-9]+]]:gpr = COPY $x10
33 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
34 ; RV64I-NEXT: [[MIN:%[0-9]+]]:gpr = MIN [[COPY]], [[COPY1]]
35 ; RV64I-NEXT: $x10 = COPY [[MIN]]
36 ; RV64I-NEXT: PseudoRET implicit $x10
37 %0:gprb(s64) = COPY $x10
38 %1:gprb(s64) = COPY $x11
39 %2:gprb(s64) = G_SMIN %0, %1
41 PseudoRET implicit $x10
50 ; RV64I-LABEL: name: umax_i64
51 ; RV64I: [[COPY:%[0-9]+]]:gpr = COPY $x10
52 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
53 ; RV64I-NEXT: [[MAXU:%[0-9]+]]:gpr = MAXU [[COPY]], [[COPY1]]
54 ; RV64I-NEXT: $x10 = COPY [[MAXU]]
55 ; RV64I-NEXT: PseudoRET implicit $x10
56 %0:gprb(s64) = COPY $x10
57 %1:gprb(s64) = COPY $x11
58 %2:gprb(s64) = G_UMAX %0, %1
60 PseudoRET implicit $x10
69 ; RV64I-LABEL: name: umin_i64
70 ; RV64I: [[COPY:%[0-9]+]]:gpr = COPY $x10
71 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
72 ; RV64I-NEXT: [[MINU:%[0-9]+]]:gpr = MINU [[COPY]], [[COPY1]]
73 ; RV64I-NEXT: $x10 = COPY [[MINU]]
74 ; RV64I-NEXT: PseudoRET implicit $x10
75 %0:gprb(s64) = COPY $x10
76 %1:gprb(s64) = COPY $x11
77 %2:gprb(s64) = G_UMIN %0, %1
79 PseudoRET implicit $x10