1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=regbankselect \
3 # RUN: -simplify-mir -verify-machineinstrs %s \
4 # RUN: -o - | FileCheck -check-prefix=RV64I %s
13 ; RV64I-LABEL: name: anyext_i32_i64
14 ; RV64I: liveins: $x10
16 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gprb(s64) = COPY $x10
17 ; RV64I-NEXT: [[TRUNC:%[0-9]+]]:gprb(s32) = G_TRUNC [[COPY]](s64)
18 ; RV64I-NEXT: [[ANYEXT:%[0-9]+]]:gprb(s64) = G_ANYEXT [[TRUNC]](s32)
19 ; RV64I-NEXT: $x10 = COPY [[ANYEXT]](s64)
20 ; RV64I-NEXT: PseudoRET implicit $x10
22 %0:_(s32) = G_TRUNC %2(s64)
23 %5:_(s64) = G_ANYEXT %0(s32)
25 PseudoRET implicit $x10
35 ; RV64I-LABEL: name: sext_i32_i64
36 ; RV64I: liveins: $x10
38 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gprb(s64) = COPY $x10
39 ; RV64I-NEXT: [[TRUNC:%[0-9]+]]:gprb(s32) = G_TRUNC [[COPY]](s64)
40 ; RV64I-NEXT: [[SEXT:%[0-9]+]]:gprb(s64) = G_SEXT [[TRUNC]](s32)
41 ; RV64I-NEXT: $x10 = COPY [[SEXT]](s64)
42 ; RV64I-NEXT: PseudoRET implicit $x10
44 %0:_(s32) = G_TRUNC %2(s64)
45 %5:_(s64) = G_SEXT %0(s32)
47 PseudoRET implicit $x10
57 ; RV64I-LABEL: name: zext_i32_i64
58 ; RV64I: liveins: $x10
60 ; RV64I-NEXT: [[COPY:%[0-9]+]]:gprb(s64) = COPY $x10
61 ; RV64I-NEXT: [[TRUNC:%[0-9]+]]:gprb(s32) = G_TRUNC [[COPY]](s64)
62 ; RV64I-NEXT: [[ZEXT:%[0-9]+]]:gprb(s64) = G_ZEXT [[TRUNC]](s32)
63 ; RV64I-NEXT: $x10 = COPY [[ZEXT]](s64)
64 ; RV64I-NEXT: PseudoRET implicit $x10
66 %0:_(s32) = G_TRUNC %2(s64)
67 %5:_(s64) = G_ZEXT %0(s32)
69 PseudoRET implicit $x10