1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=regbankselect \
3 # RUN: -disable-gisel-legality-check -simplify-mir -verify-machineinstrs %s \
4 # RUN: -o - | FileCheck -check-prefix=RV64I %s
9 tracksRegLiveness: true
12 liveins: $x10, $x11, $x12
14 ; RV64I-LABEL: name: select_i64
15 ; RV64I: liveins: $x10, $x11, $x12
17 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gprb(s64) = COPY $x10
18 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gprb(s64) = COPY $x11
19 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:gprb(s64) = COPY $x12
20 ; RV64I-NEXT: [[C:%[0-9]+]]:gprb(s64) = G_CONSTANT i64 1
21 ; RV64I-NEXT: [[AND:%[0-9]+]]:gprb(s64) = G_AND [[COPY]], [[C]]
22 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:gprb(s64) = G_SELECT [[AND]](s64), [[COPY1]], [[COPY2]]
23 ; RV64I-NEXT: $x10 = COPY [[SELECT]](s64)
24 ; RV64I-NEXT: PseudoRET implicit $x10
28 %12:_(s64) = G_CONSTANT i64 1
29 %11:_(s64) = G_AND %3, %12
30 %10:_(s64) = G_SELECT %11(s64), %4, %5
32 PseudoRET implicit $x10
38 tracksRegLiveness: true
41 liveins: $x10, $x11, $x12
43 ; RV64I-LABEL: name: select_ptr
44 ; RV64I: liveins: $x10, $x11, $x12
46 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gprb(s64) = COPY $x10
47 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $x11
48 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $x12
49 ; RV64I-NEXT: [[C:%[0-9]+]]:gprb(s64) = G_CONSTANT i64 1
50 ; RV64I-NEXT: [[AND:%[0-9]+]]:gprb(s64) = G_AND [[COPY]], [[C]]
51 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:gprb(p0) = G_SELECT [[AND]](s64), [[COPY1]], [[COPY2]]
52 ; RV64I-NEXT: $x10 = COPY [[SELECT]](p0)
53 ; RV64I-NEXT: PseudoRET implicit $x10
57 %12:_(s64) = G_CONSTANT i64 1
58 %11:_(s64) = G_AND %3, %12
59 %10:_(p0) = G_SELECT %11(s64), %4, %5
61 PseudoRET implicit $x10